Skip to content

Instantly share code, notes, and snippets.

View jsumners's full-sized avatar

James Sumners jsumners

View GitHub Profile
@marcellodesales
marcellodesales / build.gradle
Created April 24, 2012 10:55
This is a structure of a gradle project that uses a version-controlled Maven repository.
/*
* The plugins used for this build.
*/
/*
* Provides the compile, test, jar, etc tasks
*/
apply plugin: 'java'
/*
* Generates the Eclipse project files.
@rgbkrk
rgbkrk / nodemirror.py
Last active April 18, 2016 20:24
Just a quick way to mirror node's dist/ directory for nvm.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Wrote this very fast to quickly mirror nodejs's dist directory, which nvm
(the node version manager) uses to pull releases of node.
If nodejs.org provided rsync access (or other means), I would have
just mirrored it that way.
/*
A simple new-line delimited JSON protocol with upgrades.
Receiving Usage:
protocol = require('./frame-protocol');
// parsing data
parser = protocol.Parser();
@nathggns
nathggns / curry.es6.js
Created June 7, 2015 02:46
Recursive curry functions in ES6
function curry(fn, ...args) {
if (args.length === fn.length) {
return fn(...args);
}
return curry.bind(this, fn, ...args);
}
function add(a, b) {
return a + b;
@devster31
devster31 / systemd instructions.md
Created May 4, 2015 00:17
systemd units for syncthing OSX and unix

Mac OS X

Using homebrew

  1. brew install syncthing
  2. Follow the info to autostart syncthing using launchctl. At the moment this is done using this command: launchctl load ~/Library/LaunchAgents/homebrew.mxcl.syncthing.plist.

Without homebrew

Download syncthing for Mac: https://github.com/syncthing/syncthing/releases/latest.

@kagemusha
kagemusha / gist:5866759
Created June 26, 2013 11:37
Using Debugger with Grunt
version: grunt-cli v0.1.8
1. Install node-inspector globally (-g)
npm install -g node-inspector
2. Add debugger statements to your code
3. Run your grunt task in debug mode
@virasak
virasak / SQLiteDialect.java
Created January 29, 2009 07:26
SQLite dialect for Hibernate
/*
* The author disclaims copyright to this source code. In place of
* a legal notice, here is a blessing:
*
* May you do good and not evil.
* May you find forgiveness for yourself and forgive others.
* May you share freely, never taking more than you give.
*
*/
package org.hibernate.dialect;
@jsumners
jsumners / readme.md
Created March 3, 2021 12:54
Start new PR with an existing PR as a base

Ocassionally, someone will start a pull request and, for various reason, not see it through. Later, someone else may wish to finish that work. Even though the original author was unable to finish their work, we should still include their efforts in our project's history. To do so, the person wishing to finish the original pull request should start their new pull request using the original as the base.

The simplest workflow to accomplish this is:

$ # For the project on GitHub to your account and then:
$ git clone 
@dlecocq
dlecocq / 0-dependencies.sh
Last active October 16, 2022 20:04
ElasticSearch Bootstrap
# Environment
#
# export HOSTNAME=...
# export CLUSTER=...
# export RACK=...
# export ESDIR=
# export AWS_ACCESS_KEY=...
# export AWS_SECRET_KEY=...
# Packages
@Abizern
Abizern / NSData+Base64.h
Created January 19, 2012 22:52
A category on NSData for coding and encoding Base64
//
// NSData+Base64.h
// base64
//
// Created by Matt Gallagher on 2009/06/03.
// Copyright 2009 Matt Gallagher. All rights reserved.
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software. Permission is granted to anyone to