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
=INDIRECT("SheetName!"&ADDRESS(row();column()))="VALUE" |
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/sh | |
CMD="/usr/local/bin/rails" | |
CMD_ARGS='server -p 5000' | |
APP_DIR='/path/to/railsapp/home'; | |
PID_FILE=$APP_DIR/app.pid | |
LOG_FILE=$APP_DIR/app.log | |
set -e |
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/sh | |
APP_DIR='/path/to/gruntapp/home'; | |
CMD="/usr/local/bin/grunt" | |
CMD_ARGS="server --base $APP_DIR --gruntfile $APP_DIR/Gruntfile.js" | |
PID_FILE=$APP_DIR/app.pid | |
LOG_FILE=$APP_DIR/app.log | |
USER="appuser" | |
GROUP="appgroup" | |
set -e |
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
# Filter files that contains (1) in their names (copies). Remove this from the name and then use this delete the original files | |
ls *.jpg | cut -d. -f1 | cut -d"(" -f1 | awk '{print $1".JPG"}' | xargs rm |
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/sh | |
### BEGIN INIT INFO | |
# Provides: appname | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts appname server | |
# Description: starts appname server using start-stop-daemon |
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
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=foo-compressed.pdf foo.pdf |
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
for i in *.JPG; do mv "$i" `basename "$i" .JPG`.jpg; done |
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" : "Pinco", | |
"lastname" : "Pallino", | |
"birthdate" : "1984-06-21" | |
"healthProfile" : { | |
"weight" : 78.9, | |
"height" : 172 | |
} | |
} |
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
$.ajaxSetup({ | |
beforeSend: function(xhr) { | |
xhr.setRequestHeader("PLAY_SESSION", sessionKey); | |
} | |
}); |
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 sessionData = new Object; | |
sessionData.email = $("#email").val(); | |
sessionData.password = $.sha1($("#password").val(); | |
$.ajax({ | |
type: "POST", | |
url: "/login", | |
data: JSON.stringify(sessionData), | |
async: false, | |
success: function (data) { | |
alert("ok"); |