Rails flash messages with AJAX requests & twitter-bootstrap 2.3
Forked from https://gist.github.com/linjunpop/3410235 Based on Stackoverflow answer: http://stackoverflow.com/a/10167659/656428
License: MIT
| daemon off; | |
| error_log /dev/stdout error; | |
| worker_processes 4; | |
| events { | |
| worker_connections 1024; | |
| } | |
| function serializeMultipart (obj, previous) { | |
| var pairs = [] | |
| _.each(obj, function (value, key) { | |
| if (previous !== undefined) { | |
| key = previous + '[' + key + ']' | |
| } | |
| if (_.isArray(value)) { | |
| _.each(value, function (value) { | |
| pairs.push([key + '[]', value]) |
| // ==UserScript== | |
| // @name Facebook fix | |
| // @namespace https://gist.github.com/k98kurz | |
| // @updateURL https://gist.githubusercontent.com/k98kurz/6026739/raw | |
| // @version 1.2.1 | |
| // @description blah | |
| // @match https://*.facebook.com/* | |
| // @copyright 2014+, k98kurz | |
| // ==/UserScript== |
| #!/bin/bash | |
| # This script cleans up your EC2 instance before baking a new AMI. | |
| # Run the following command in a root shell: | |
| # | |
| # bash <(curl -s https://gist.github.com/justindowning/5921369/raw/ami-clean.sh) | |
| function print_green { | |
| echo -e "\e[32m${1}\e[0m" | |
| } |
| /* | |
| * Convert a string into a human readable title | |
| * | |
| * This function borrows heavily from sugar.js | |
| * http://sugarjs.com/ | |
| * | |
| * titleize("man from the boondocks") -> Man from the Boondocks | |
| * titleize("x-men: the last stand") -> X Men: The Last Stand | |
| * titleize("TheManWithoutAPast") -> The Man Without a Past | |
| * titleize("raiders_of_the_lost_ark") -> Raiders of the Lost Ark |
| upstream backends { | |
| ip_hash; | |
| server 0.0.0.0:80; | |
| server 0.0.0.0:80; | |
| } | |
| server { | |
| server_name app.falconsocial.com; |
Rails flash messages with AJAX requests & twitter-bootstrap 2.3
Forked from https://gist.github.com/linjunpop/3410235 Based on Stackoverflow answer: http://stackoverflow.com/a/10167659/656428
License: MIT
| /** | |
| * This casper scipt checks for 404 internal links for a given root url. | |
| * | |
| * Usage: | |
| * | |
| * $ casperjs 404checker.js http://mysite.tld/ | |
| * $ casperjs 404checker.js http://mysite.tld/ --max-depth=42 | |
| */ | |
| /*global URI*/ |
| #import <Foundation/Foundation.h> | |
| #import <CommonCrypto/CommonDigest.h> | |
| #import <CommonCrypto/CommonHMAC.h> | |
| @interface NSString (Extras) | |
| + (NSString *)authSignatureWithToken:(NSString *)token; | |
| @end | |
| @implementation NSString (Extras) |
| #!/usr/bin/ruby | |
| =begin | |
| Usage: rtftomarkdown.rb FILENAME.rtf | |
| Uses textutil, available on Mac only (installed by default) | |
| Outputs to STDOUT | |
| Notes: | |
| Links are replaced with Markdown references (duplicate links combined). |