Skip to content

Instantly share code, notes, and snippets.

Jack Killilea xjackk

Block or report user

Report or block xjackk

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
@t2k
t2k / post-update
Created May 6, 2015
my post-update (hook) How to deploy a website via a shared repo.
View post-update
#!/bin/sh
#
# An example hook script to prepare a packed repository for use over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".
#
# ie: git push default_test MyNewBranch
# $1 would equal refs/heads/MyNewBranch
# and $branch = MyNewBranch
@t2k
t2k / files.coffee
Last active Jan 31, 2017
Stream Uploads to MongoDB GridStore. Node server side async.parallel image processing using: busboy, gridfs-stream, async, sharp
View files.coffee
# express file upload controller
#Mongoose configuration.
mongoose = require "mongoose"
Busboy = require "busboy"
secrets = require "../config/secrets"
GridStream = require "gridfs-stream"
Files = require "../models/files"
sharp = require "sharp"
async = require "async"
@Zehkul
Zehkul / Convert Script – README.md
Last active Nov 14, 2019
Script to quickly convert and crop videos from within mpv
View Convert Script – README.md

#README:

This script for mpv intends to offer the fastest and simplest way to convert parts of a video—while you’re watching it and not really more work intensive than making a screenshot. A short demonstration: https://d.maxfile.ro/omdwzyhkoa.webm

##Installation:

You need:

  • yad (at least 0.26) (AUR)
@Kartones
Kartones / postgres-cheatsheet.md
Last active Dec 15, 2019
PostgreSQL command line cheatsheet
View postgres-cheatsheet.md

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
View bootstrap-myproject.sh
#!/bin/sh
# Setup some variables needed for bootstrapping the environment
ROOT=/home/vrde/projectz/myproject
REPOS=${ROOT}/repos
export PYTHONPATH=${REPOS}
@fwielstra
fwielstra / api.js
Created Jun 14, 2011
An example NodeJS / Mongoose / Express application based on their respective tutorials
View api.js
/* The API controller
Exports 3 methods:
* post - Creates a new thread
* list - Returns a list of threads
* show - Displays a thread and its posts
*/
var Thread = require('../models/thread.js');
var Post = require('../models/post.js');
You can’t perform that action at this time.