Skip to content

Instantly share code, notes, and snippets.

View eliperelman's full-sized avatar

Eli Perelman eliperelman

View GitHub Profile
@eliperelman
eliperelman / file.js
Created August 23, 2013 19:01
JavaScript Regex replace all lines that don't contain string
/^(?:(?!TOKEN).)*$[\r\n]/igm
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);
}
lib-cov
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz
pids
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
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 |
@eliperelman
eliperelman / BarnDoorTracker.ino
Created October 24, 2012 03:51
Barn Door Tracker - Arduino
#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);
@eliperelman
eliperelman / compose.js
Created September 13, 2012 21:48
Recursive function composition
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;
@eliperelman
eliperelman / .gitconfig
Created September 11, 2012 16:18
git ignore command
[alias]
ignore = "!i() { echo $1 >> .gitignore; }; i"
function deferredRequest( resource, data ) {
return $.Deferred(function( dfd ) {
amplify.request({
resourceId: resource,
data: data,
success: dfd.resolve,
error: dfd.reject
});
}).promise();
}
@eliperelman
eliperelman / laws.md
Last active August 2, 2016 05:48
appendTo Laws of Skype

Whitbeck’s Law

If it exists, there is a GIF of it.

Manor’s Law

For every message there is an equal and opposite deletion.

Cowart’s Law

All great messages will be deleted before you have a chance to read them.

Neiner’s Law