Skip to content

Instantly share code, notes, and snippets.

View ralphsaunders's full-sized avatar

Ralph Saunders ralphsaunders

View GitHub Profile
@ralphsaunders
ralphsaunders / Borked.md
Created November 6, 2012 02:25
I borked Postgresql
ralph:~ ralphsaunders$ sudo psql postgres -c 'CREATE EXTENSION "adminpack";'
Password:
psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

ralph:lib ralphsaunders$ ps auxw | grep postgres
    ralphsaunders  87696   0.0  0.0  2455456    592   ??  Ss    2:16am   0:00.08 postgres: writer process       
    ralphsaunders  87695   0.0  0.0  2455456    552   ??  Ss    2:16am   0:00.00 postgres: checkpointer process       

ralphsaunders 87693 0.0 0.2 2455456 6300 ?? S 2:16am 0:00.02 /usr/local/bin/postgres -D /usr/local/var/postgres -r /usr/local/var/postgres/server.log

core.chunk = function (array, chunkSize) {
/// <summary>
/// Splits a given array into separate arrays of the given chunkSize
/// </summary>
/// <param name="array" type="array"></param>
/// <param name="chunkSize" type="number"></param>
/// <returns type="array"></returns>
var count = 1;
var newArray = [];
var limit = chunkSize;
@ralphsaunders
ralphsaunders / ginn.js
Last active January 3, 2016 21:29 — forked from seanmtracey/ginn.js
var ginn = (function(){
window.addEventListener('scroll', function(e) {
document.body.scrollHeight = e.pageY + 100000 + 'px';
});
window.dispatchEvent(scroll);
})();
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Hagrid {
final static List<String> compass = new ArrayList<>(Arrays.asList("N","E","S","W"));
public static void main(String[] args) {
File root = new File("C:/Users/.../Desktop/Hedge Maze");