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
;;ADD THIS TO INIT.EL | |
;; set the path as terminal path [http://lists.gnu.org/archive/html/help-gnu-emacs/2011-10/msg00237.html] | |
(setq explicit-bash-args (list "--login" "-i")) | |
;; fix the PATH variable for GUI [http://clojure-doc.org/articles/tutorials/emacs.html#osx] | |
(defun set-exec-path-from-shell-PATH () | |
(let ((path-from-shell |
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 keep Excel from dynamically moving the target range for a function, use the $ in front of the col and row references. | |
On a windows machine, you can toggle through the "lock down" methods with the F4 key. | |
A '$' will lock down the reference to an absolute one versus a relative one. You can lock down the column, row or both. Here is a locked down absolute reference for your example. | |
(A1-MIN($A$1:$A$30))/(MAX($A$1:$A$30)-MIN($A$1:$A$30)) | |
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
(cd /opt/jboss-fuse && tar c .) | (cd /mnt/lastbackup/jboss-fuse && tar xf -) |
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
$firstName = New-Object System.Windows.Forms.textBox | |
$firstName.add_KeyUp({ $fullName.Text = $firstName.text + " " + $lastName.text}) | |
$lastName = New-Object System.Windows.Forms.textBox | |
$lastName.top += 50 | |
$lastName.add_KeyUp({ $fullName.Text = $firstName.text + " " + $lastName.text}) | |
$fullName = New-Object System.Windows.Forms.textBox | |
$fullName.top += 100 |
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
# Count the number of lines in a file | |
cat file.txt | wc -l | |
# Jump to a line with less | |
less +392800g file.txt | |
# View the top of a file (eg. view the column headers of a csv file) | |
head file.txt | |
# Grab the first 8 fields of a delimeted file and save to another |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/usr/bin/sshpass -p mypass ssh [email protected] -o UserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no 'tar zcf - ./scratch/in' | \ | |
/usr/bin/sshpass -p mypass ssh [email protected] -o UserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no 'tar xzf - -C ./scratch/out' |
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
/* | |
Copyright (c) 2015 My Name <[email protected]> | |
Permission is hereby granted, free of charge, to any person | |
obtaining a copy of this software and associated documentation | |
files (the |
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
import logging | |
import traceback as tb | |
import suds.metrics as metrics | |
from suds import WebFault | |
from suds.client import Client | |
errors = 0 | |
logging.getLogger('suds.client').setLevel(logging.DEBUG) |
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
Workaround to issue with CMD.exe inside emacs not prompting for password when "git push" command is issued. | |
1. download and run git-credential-winstore.exe - https://gitcredentialstore.codeplex.com | |
2. add this to the .gitconfig in C:\Users\<youruser> - http://emacs.stackexchange.com/questions/478/magit-push-hangs-on-windows | |
[credential] | |
helper = "winstore" | |
Now when inside emacs, do M-x, shell. | |
Try pushing through https to github, you'll get a graphical login that allows you to input user/pass. |