Skip to content

Instantly share code, notes, and snippets.

Eli Perelman eliperelman

Block or report user

Report or block eliperelman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@eliperelman
eliperelman / file.js
Created Aug 23, 2013
JavaScript Regex replace all lines that don't contain string
View file.js
/^(?:(?!TOKEN).)*$[\r\n]/igm
View main.java
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);
}
View gist:5887657
lib-cov
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz
pids
View Directions
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
View gist:4692268
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 Oct 24, 2012
Barn Door Tracker - Arduino
View BarnDoorTracker.ino
#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 Sep 13, 2012
Recursive function composition
View compose.js
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 Sep 11, 2012
git ignore command
View .gitconfig
[alias]
ignore = "!i() { echo $1 >> .gitignore; }; i"
View amplify.request.deferred.js
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 Aug 2, 2016
appendTo Laws of Skype
View laws.md

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

You can’t perform that action at this time.