This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type f -exec echo {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type f -exec echo \"{}\" \;> files.list | |
cat files.list | xargs md5sum > files-hash.list | |
sort files-hash.list | uniq -d --check-char=32 > result.list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Clear the highlighting to allow the user to toggle | |
* between the original page & the highlighted page. | |
*/ | |
function clearHighlighting() | |
{ | |
alert("clearing hightlighting..."); | |
if (!document.body || typeof(document.body.innerHTML) == "undefined") { | |
if (warnOnFailure) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var url = location.protocol.concat("//") + window.location.host; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to find out where a method comes from. | |
# Learned this from Dave Thomas while teaching Advanced Ruby Studio | |
# Makes the case for separating method definitions into | |
# modules, especially when enhancing built-in classes. | |
module Perpetrator | |
def crime | |
end | |
end | |
class Fixnum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kill $(ps aux | grep '[p]ython csp_build.py' | awk '{print $2}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alter database Pishgaman_CRM set compatibility_level = 110 | |
select compatibility_level from sys.databases where name = 'Pishgaman_CRM' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# this script is not written by me. Just using it and sharing it here. | |
# export DBUS_SESSION_BUS_ADDRESS environment variable useful when the script is set as a cron job | |
PID=$(pgrep gnome-session) | |
export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-) | |
# $bing is needed to form the fully qualified URL for |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To delete a local branch | |
git branch -d the_local_branch | |
To remove a remote branch (if you know what you are doing!) | |
git push origin :the_remote_branch |
OlderNewer