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 css = 'insert lots of css here'; | |
var files = {}; | |
css = css.replace(/url\((\S*)\.(png|jpg|jpeg|gif)\)/g, function(match, file, type) | |
{ | |
var fileName = file + '.' + type; | |
var base64 = fs.readFileSync(fileName).toString('base64'); | |
if (typeof(files[fileName]) !== 'undefined') { | |
console.log('Warning: ' + fileName + ' has already been base64 encoded in the css'); | |
} |
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
DO WHAT THE **** YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Eli Perelman http://eliperelman.com | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE **** YOU WANT TO PUBLIC LICENSE |
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 siteRoutes = { | |
'login': 'layouts/login', | |
'index': 'layouts/site' | |
}; | |
App.ApplicationView = Ember.View.extend({ | |
layoutName: function () { | |
var currentPath = this.get('controller.currentPath'); | |
if (siteRoutes[currentPath]) { |
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
/^(?:(?!TOKEN).)*$[\r\n]/igm |
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
package com.eliperelman.plugins.headsup; | |
import org.bukkit.event.Listener; | |
import org.bukkit.plugin.java.JavaPlugin; | |
public class main extends JavaPlugin implements Listener { | |
@Override | |
public void onEnable() { | |
getServer().getPluginManager().registerEvents(this, this); | |
} |
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
lib-cov | |
*.seed | |
*.log | |
*.csv | |
*.dat | |
*.out | |
*.pid | |
*.gz | |
pids |
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
Command to run: | |
ssh -L 2222:localhost:8501 user@remoteserver.com | |
where 2222 is the local port mapping it can be any number above 1000 | |
where localhost must be set to localhost and refers to your current connection | |
where 8501 is the port you will be opening up on the remote machine | |
where user@remoteserver.com is the first hop in your quest for internal access |
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
JSWEEKLY BINGO | |
+-------------------------------+-------------------------------+-------------------------------+ | |
| An article from someone who | | | | |
| just figured out | Baby's first functional | How to do this one very | | |
| prototype-based OO and thinks | programming | specific thing in Node.js | | |
| everyone else needs telling | | | | |
+-------------------------------+-------------------------------+-------------------------------+ | |
| | | | | |
| A new jQuery release | A job in San Francisco | An introduction to an MVC | | |
| | | framework | |
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
#include <AFMotor.h> | |
const float rpm = 6.999999; | |
const int stepsPerRevolution = 200; | |
const int shieldPort = 1; | |
AF_Stepper motor(stepsPerRevolution, shieldPort); | |
void setup() { | |
// set up Serial library at 9600 bps | |
Serial.begin(9600); |
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 compose = function () { | |
var args = arguments; | |
return function () { | |
var funcs = [].slice.call(args); | |
return (function x(value) { | |
var current = funcs.pop(); | |
return current ? x(current(value)) : value; |