This file contains hidden or 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
class FormFoo : Form { | |
// ... | |
// This is an UI control event handler, so any errors | |
// that happen are going to be reported to the user (via the MessageBox.Show) | |
private void Bt1_Click(object sender, EventArgs e) { | |
try { | |
DoStuff(); | |
DoStuff2(); | |
}catch(Exception ex){ |
This file contains hidden or 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
scp user@host:/path/to/some/file.txt localfile.txt | |
# full folder | |
scp -r user@host:/path/to/some/folder localfolder |
This file contains hidden or 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
cat some_in_file.txt | sed 's/^.*$/"&"/g' > some_out_file.txt |
This file contains hidden or 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
# From https://help.github.com/articles/remove-sensitive-data | |
# If you haven't done it yet: | |
git rm thefile.ext | |
# And to purge it from history | |
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch thefile.ext' --prune-empty --tag-name-filter cat -- --all |
This file contains hidden or 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
# From http://www.linuxforums.org/forum/newbie/27030-bash-dev-null-permission-denied-why.html | |
# Do this as root | |
rm /dev/null | |
mknod -m 0666 /dev/null c 1 3 |
This file contains hidden or 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
;; if you're using zend server, you may need to | |
;; 1 - remove/disable etc/conf.d/debugger.ini | |
;; 2 - comment zend.ini_scandir=... altogether | |
;; | |
;; I've had success with both :| | |
;; on zend server, install xdebug via pecl | |
;; or if you feel brave, checkout the source | |
;; and build it yourself (check the README, | |
;; watch out for the necessary configurations before make) |
This file contains hidden or 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
// From http://askubuntu.com/questions/40979/what-is-the-path-to-the-kernel-headers-so-i-can-install-vmware | |
cd /lib/modules/$(uname -r)/build/include/linux | |
sudo ln -s ../generated/utsrelease.h | |
sudo ln -s ../generated/autoconf.h | |
sudo ln -s ../generated/uapi/linux/version.h |
This file contains hidden or 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
# http://stackoverflow.com/questions/6865302/push-local-git-repo-to-new-remote-including-all-branches-and-tags | |
git push origin --all |
This file contains hidden or 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
# Ensure you have openssh-server on the remote host and sshfs on the client host | |
### On the remote | |
# https://help.ubuntu.com/10.04/serverguide/openssh-server.html | |
sudo apt-get install openssh-server | |
### On the client | |
# http://www.howtogeek.com/howto/ubuntu/how-to-mount-a-remote-folder-using-ssh-on-ubuntu/ | |
# http://www.linuxnix.com/2011/03/mount-directory-locally-linux-sshfs.html | |
sudo apt-get install sshfs |
This file contains hidden or 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
wget -r -k -p the-site -X exclude-dir-1,exclude-dir-2 |