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_NAME=$1 | |
APPSSLPATH=/usr/local/etc/nginx/ssl/$APP_NAME; | |
sudo mkdir -p $APPSSLPATH && cd $APPSSLPATH; | |
# sudo /usr/bin/openssl req -new -key $KEY_FILEPATH -out $APPSSLPATH/$APP_NAME.csr && \ | |
sudo openssl req -new -newkey rsa:2048 -nodes -out $APP_NAME.csr -keyout $APP_NAME.key -subj "/C=US/ST=California/L=San Francisco/O=Engineering Inc./CN=$APP_NAME" && \ |
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
<!--appended to default to work with bh_core.sublime-settings brackethighlighter.default style--> | |
<dict> | |
<key>name</key> | |
<string>Bracket Tag</string> | |
<key>scope</key> | |
<string>brackethighlighter.default</string> | |
<key>settings</key> | |
<dict> | |
<key>background</key> | |
<string>#351501</string> |
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
log_format main '{\nrequest: "$request @ [$time_local]", \nremote_addr: "$remote_addr", \nremote_user: "$remote_user",' | |
'\nstatus: "$status", \nbody_bytes_sent: "$body_bytes_sent", \nhttp_referer: "$http_referer", ' | |
'\nhttp_user_agent: "$http_user_agent", \nhttp_x_forwarded_for: "$http_x_forwarded_for"\n},'; |
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 deferred = $q.defer(); | |
$timeout(function() { | |
deferred.resolve('Hello!'); | |
}, 1000); | |
return deferred.promise; |
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
storage: | |
dbPath: /var/lib/mongodb | |
journal: | |
enabled: true | |
systemLog: | |
destination: file | |
path: /var/log/mongodb/mongod.log | |
logAppend: true | |
logRotate: rename |
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
# This works | |
def welcome_email(email) | |
recipients email.email | |
subject "Welcome to PeerPong!" | |
sent_on Time.now | |
body :email => email.email | |
from "peerpong@peerpong.com" | |
reply_to "peerpong@peerpong.com" | |
end |
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
can i only embed public gists? |
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
Array { | |
[column_1_label] => "Initial Payment" | |
[column_1_tier_1_value] => "{UpfrontCost}" | |
[column_1_tier_1_footnote] => "" | |
[column_1_tier_2_value] => "" | |
[column_1_tier_2_footnote] => "" | |
[column_2_label] => "20 Year Savings" | |
[column_2_tier_1_value] => "{20YearSavings}" | |
[column_2_tier_1_footnote] => "" | |
[column_2_tier_2_value] => "{FederalLocalRebateSum}" |
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
// 1234567 | |
// racecar | |
// 0123456 | |
// >>>X<<< close in on it, only need half the length of word loopage | |
function is_palindrome(word) { | |
var outcome = true; | |
for(i = 0; i <= (word.length / 2); i++) { | |
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
function getAjaxResultAndReturnIt() { | |
$.getJSON("/url", function(json){ | |
if(json.result) { | |
return true; // will not bubble up as return of function call | |
} else { | |
return false; // will not bubble up as return of function call | |
OlderNewer