#Disable window animations
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
#Enable repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
This file contains hidden or 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
{ | |
"name": "App", | |
"version": "0.0.1", | |
"private": "true", | |
"dependencies": { | |
"foundation": "zurb/bower-foundation#master", | |
"foundation-icon-fonts": "master", | |
"lodash": "master", | |
"modernizr": "*", | |
"microplugin": "*", |
This file contains hidden or 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
Package.describe({ | |
summary: "SASS for meteor", | |
version: "2.0.1_1", | |
name: "particle4dev:sass", | |
git: "https://github.com/particle4dev/meteor-sass.git" | |
}); | |
Package.onUse(function (api) { | |
api.versionsFrom('[email protected]'); | |
}); |
This file contains hidden or 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
{ | |
"name": "App", | |
"version": "0.0.1", | |
"private": "true", | |
"dependencies": { | |
"foundation": "*", | |
"lodash": "master", | |
"modernizr": "*", | |
"microplugin": "*", | |
"underscore.string": "master", |
This file contains hidden or 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
/** | |
* Web browsers use URIs for the href attribute of the <a> tag and for bookmarks. The URI scheme, such as http:, file:, or ftp:, specifies the protocol and the format for the rest of the string. | |
* Browsers also implement a prefix javascript: that to a parser is just like any other URI. | |
* Internally, the browser sees that the specified protocol is javascript, treats the rest of the string as a JavaScript application which is then executed, and uses the resulting string as the new page. | |
* | |
* The executing script has access to the current page, which it may inspect and change. | |
* If the script returns an undefined type (rather than, for example, a string), the browser will not load a new page, with the result that the script simply runs against the current page content. | |
* This permits changes such as in-place font size and color changes without a page reload. | |
*/ |
This file contains hidden or 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
// Get the template HTML and remove it from the doumenthe template HTML and remove it from the doument | |
var previewNode = document.querySelector("#template"); | |
previewNode.id = ""; | |
var previewTemplate = previewNode.parentNode.innerHTML; | |
previewNode.parentNode.removeChild(previewNode); | |
var myDropzone = new Dropzone(document.body, { // Make the whole body a dropzone | |
url: "/target-url", // Set the url | |
thumbnailWidth: 80, | |
thumbnailHeight: 80, |
This file contains hidden or 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 decorates Handlebars.js with the ability to load | |
* templates from an external source, with light caching. | |
* | |
* To render a template, pass a closure that will receive the | |
* template as a function parameter, eg, | |
* T.render('templateName', function(t) { | |
* $('#somediv').html( t() ); | |
* }); | |
* Source: https://github.com/wycats/handlebars.js/issues/82 |
This file contains hidden or 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
String.prototype.strReplace = function(find, replace) { | |
if(typeof find === 'string') | |
return this.split(find).join(replace); | |
var str = this; | |
for(var i in find) | |
str = str.split(find[i]).join(replace[i]); | |
return str; |
This file contains hidden or 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
// PhantomJS Cheatsheet | |
$ brew update && brew install phantomjs // install PhantomJS with brew | |
phantom.exit(); | |
var page = require('webpage').create(); | |
page.open('http://example.com', function() {}); | |
page.evaluate(function() { return document.title; }); |
This file contains hidden or 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
user www-data; | |
#worker_processes 4; | |
#worker_priority 0; | |
#worker_cpu_affinity 0001 0010 0100 1000; | |
#worker_rlimit_nofile 163840; | |
#worker_processes 8; | |
#worker_priority 0; | |
#worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000; |
OlderNewer