Set
:FORWARD ACCEPT [0:0]
Instead of
:FORWARD DROP [0:0]
in
/etc/iptables/rules.v4
git reset HEAD^ --hard
$ git push origin -f
As a matter of fact, you CAN enlarge the root filesystem while Ubuntu is running (I learned this recently myself here) - this sounds incredible but it's true :)
Here's the list of steps for a simple scenario where you have two partitions,/dev/sda1is an ext4 partition the OS is booted from and/dev/sdb2is swap. For this exercise we want to remove the swap partition an extend/dev/sda1to the whole disk.
As always, make sure you have a backup of your data - since we're going to modify the partition table there's a chance to lose all your data if you make a typo, for example.
Runsudo fdisk /dev/sda
- use
pto list the partitions. Make note of the start cylinder of/dev/sda1
- use
dto delete first the swap partition (2) and then the/dev/sda1partition. This is very scary but is actually harmless as the data is not written to the disk until you write the changes to the disk.
- use
nto create a new primary partition. Make sure its start cylinder is exactly the same as the old/dev/sda1used to have. For the end cylinder agree with the default choice, which is to make the partition to span the whole disk.
- use
ato toggle the bootable flag on the new/dev/sda1Reboot with
- review your changes, make a deep breath and use
wto write the new partition table to disk. You'll get a message telling that the kernel couldn't re-read the partition table because the device is busy, but that's ok.sudo reboot. When the system boots, you'll have a smaller filesystem living inside a larger partition.
The next magic command isresize2fs. Runsudo resize2fs /dev/sda1- this form will default to making the filesystem to take all available space on the partition.
That's it, we've just resized a partition on which Ubuntu is installed, without booting from an external drive.
http://<your domain>/jenkins/git/notifyCommit?url=<your git repository url>eg
http://fakewebsite.com:8080/jenkins/git/notifyCommit?url=git@bitbucket.org:faceuser/fakeproject.git
ssh to the machine and check who ones the files/dirs if it owned by root change it to the tomcat users
sudo chown -R username:group directory
import re
import os
from collections import Counter
# Compile the regular expressions \d{9} selects numbers that are 9 digits longs
p = re.compile('\d{9}', re.IGNORECASE)
output_file_name = 'output.csv'
# Initiate an array to store the students ids in
most_active = []
#for the files in this directory
for name in os.listdir("."):
#if it starts with localhost_access_log & ends with a .txt extension
if name.startswith("localhost_access_log") and name.endswith(".txt"):
#read its contents
with open(name, 'r') as myfile:
print("Reading file: "+name)
data=myfile.read().replace('\n', '')
#Add the regex matches to the array
most_active = most_active + re.findall(p, data)
# Count how many times a student id is repeated in the list
# This will tell us the most active students in the app
count = Counter(most_active)
# For each of the students, order them from most common to least
output_file = open(output_file_name,"w")
output_file.write("Student ID, Activity\n")
for student in count.most_common():
line = str(student[0])+","+str(student[1])
#print(line)
output_file.write(line+"\n")
output_file.close()
print("File written successfully: "+output_file_name)
#Print out the total amount of students
print("Total Students:"+ str(len(count)))
compile "org.grails.plugins:mongodb:5.0.0.RC1"
<style type="text/css"> /* bootstrap hack: fix content width inside hidden tabs */ .tab-stats-content > .tab-stats-pane { display: block; /* undo display:none */ height: 0; /* height:0 is also invisible */ overflow: hidden; /* no-overflow */ padding: 0px; } .tab-stats-content > .active, .tab-stats-pane > .active { /* let the content decide it */ height: 100%; } /* bootstrap hack end */ </style> <ul class="nav nav-tabs" id="myTab"> <li class="tab-pane active"><a href="#active" data-toggle="tab">Teams And Users By Week</a></li> <li><a href="#teamsbysport" data-toggle="tab">Teams By Sport</a></li> <li><a href="#teamsthismonth" data-toggle="tab">Teams Created This Month</a></li> </ul> <div class="tab-stats-content"> <div class="tab-stats-pane active" id="active"> {{ render(controller('RosterbotAnalyticBundle:Graph:Draw', {'graph':'TeamsAndUsersByWeek', 'div' : 'active'} ))}} </div> <div class="tab-stats-pane" id="teamsbysport"> {{ render(controller('RosterbotAnalyticBundle:Graph:Draw', {'graph':'TeamsBySport', 'div' : 'teamsbysport'} ))}} </div> <div class="tab-stats-pane" id="teamsthismonth"> {{ render(controller('RosterbotAnalyticBundle:Graph:Draw', {'graph':'TeamsThisMonth', 'div' : 'teamsthismonth'} ))}} </div> </div>