git
discard all local changes/commits and pull from upstream
git reset --hard origin/master
git pull origin master
from scapy.all import * | |
def arp_display(pkt): | |
if pkt[ARP].op == 1: #who-has (request) | |
if pkt[ARP].psrc == '0.0.0.0': # ARP Probe | |
print "ARP Probe from: " + pkt[ARP].hwsrc | |
print sniff(prn=arp_display, filter="arp", store=0, count=10) | |
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
git
discard all local changes/commits and pull from upstream
git reset --hard origin/master
git pull origin master
// This goes in application.js | |
// Using this, the confirmation alerts on Rails 3.1 will be replaced with this behaviour: | |
// The link text changes to 'Sure?' for 2 seconds. If you click the button again within 2 seconds the action is performed, | |
// otherwise the text of the link (or button) flips back and nothing happens. | |
$.rails.confirm = function(message, element) | |
{ | |
var state = element.data('state'); | |
var txt = element.text(); | |
if (!state) |
In Tools | Options | Keyboard...
CTRL+W
as a Global shortcut for Window.CloseDocumentWindow
CTRL+W
shortcut for Edit.SelectCurrentWord
The caveat to this is if you are used to using CTRL+W
to select the current word. If you do, find another shortcut that works for that.
pm list packages -f |