🐼
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
// Demo: http://jsfiddle.net/pFaSx/ | |
// Create an invisible iframe | |
var iframe = document.createElement('iframe'); | |
iframe.id = "hacky-scrollbar-resize-listener"; | |
iframe.style.cssText = 'height: 0; background-color: transparent; margin: 0; padding: 0; overflow: hidden; border-width: 0; position: absolute; width: 100%;'; | |
// Register our event when the iframe loads | |
iframe.onload = function() { | |
// The trick here is that because this iframe has 100% width |
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
// Hook in to `addEventListener` to track the mouse and display it as a circle | |
exports.onPageLoad = function() { | |
return browser.executeScript(function() { | |
(function() { | |
var EventSniffer = function() { | |
this.history = []; | |
this.callbacks = {}; | |
this.minCacheSize = 100; | |
this.maxCacheSize = 500; | |
}; |
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
import cherrypy | |
import sqlalchemy | |
from sqlalchemy import Table, Column, ForeignKey, MetaData, Integer, String | |
from sqlalchemy.orm import scoped_session, sessionmaker, mapper, relationship | |
from sqlalchemy.orm.properties import ColumnProperty | |
from sqlalchemy.orm.util import object_mapper | |
# The base class from which all entities will extend | |
class BaseEntity(object): | |
def __repr__(self): |
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/bash | |
brew uninstall node | |
brew prune | |
sudo rm -rf $HOME/{local,lib,include,node*,npm,.npm*} | |
sudo rm -rf /usr/local/lib/node* | |
sudo rm -rf /usr/local/include/node* | |
sudo rm -rf /usr/local/bin/{node,npm} | |
sudo rm -rf /usr/local/share/man/man1/node.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
const screenshot = (text = '') => { | |
const upload = filename => { | |
const util = require('util'); | |
const exec = require('child_process').exec; | |
const command = 'curl -sbv ' + | |
'-H \'Content-Type: multipart/form-data\' ' + | |
'-H \'Accept: application/json\' ' + | |
'-F "file=@./' + filename + '" ' + | |
'-F "upload_preset=kzrkwuhx" ' + |
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
/** | |
* Juan's leaving card: http://is.gd/juan_leaving | |
*/ | |
(function() { | |
'use strict'; | |
var message = [ | |
' gg ', | |
' dP8, ', | |
' dP Yb ', |
Original: http://www.pure360.com/blog/blog-entries/Grunt-install by Alfonso de la Osa
These instructions are specific to Windows.
- Download and install Node.js 0.10.x from http://nodejs.org/
- Download and install Python 2.7.x from http://www.python.org/download/
- Download and install Microsoft Visual Studio C++ 2012 Express from: http://go.microsoft.com/?linkid=9816758
NewerOlder