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
############################################################################ | |
# Installing nodejs, npm, and all their pals on a Rackspace Ubuntu Server | |
############################################################################ | |
# First get your tools together | |
apt-get update | |
apt-get install emacs | |
apt-get install git | |
apt-get install curl | |
apt-get install libssl-dev |
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 <script> tags: | |
------------------- | |
Find: | |
src="js/(\S+)"> | |
Replace: | |
src="\${resource(dir:'js',file:'$1')}"> |
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 example uses backbone.js to capture the hash change event. | |
// Unrelated functionality is referenced but not shown. | |
// Where ever you call it from, Unwired.login should look like the following: | |
/* | |
Unwired.login(guid, { | |
url: document.location.href+"#loginComplete" | |
}); |
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
javascript:function octoresponsive() { | |
$(".container, #slider .frames .frame, #slider .frames, .container.hentry, .avatar-bubble, html,body").css({width:'100%','minWidth':0,'paddingLeft':0}); $("#slider .frames .frame").css({'margin-right':0}); | |
$(".columns.browser .sidebar").css({width:'20%',paddingRight:'2%'}); | |
$(".columns.browser .main").css({width:'70%'}); | |
} | |
function twitterresponsive(){ | |
$(".wrapper, .wrapper-narrow, .wrapper-permalink").css({width:'100%',paddingLeft:0, paddingRight:0}); | |
$(".dashboard").css({width:'30%',paddingRight:0, paddingLeft: 0}); | |
$(".content-main").css({width:'70%',paddingRight:0,paddingLeft: 0}); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test Swift CORS</title> | |
<!-- Only using jQuery for jQuery.parseJSON --> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<div style="border: thin solid grey; padding-left: 10px; width: 50%; margin-left: auto; margin-right: auto"> |
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
git clone [email protected]:balderdashy/sails-example.git sails-example | |
cd sails-example | |
npm install sails | |
npm install rigging | |
cp config.ex.js config.js | |
# Modify config.js to map to one of your local mySQL databases with your username and password | |
node sails.js | |
# The app is configured to run on port 5008 at the moment, and you can check out: | |
# http://localhost:5008/experiment |
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
$("#only_following").find('ul').children().find('a').each(function(i,el){unfollow($(el).text()); }) |
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/ksh | |
#———————————————————————- | |
# Name: SendMail | |
# Purpose: To send mails using the sendmail command | |
# Usage: SendMail | |
# Owner: Ketan Joshi | |
# Setting: Just change the variables at the start of the script to | |
# appropriate values. Create a message by modifying the string BODY | |
# You can even have html tags in the body. | |
# Limitation: Currently, this does not support attachments. |
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
/** | |
* @test - condition to check | |
* @action - do something | |
* @tryInterval - how often to try (default to 50ms) | |
* @sharedTimer - if sharedTimer is specified, clear it when action is fired | |
* @eachTime - function to run each time the condition is checked | |
* returns timer | |
*/ | |
function waitUntil (test,action,tryInterval,sharedTimer,eachTime) { | |
var timer = setInterval(function() { |
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
// Recursive underscore methods | |
_.recursive = { | |
// fn(value,keyChain) | |
all: function(collection,fn,maxDepth) { | |
if (!_.isObject(collection)) { | |
return true; | |
} | |
// Default value for maxDepth |
OlderNewer