Skip to content

Instantly share code, notes, and snippets.

View jpalala's full-sized avatar
🔭
Lets build something useful

Joe Palala jpalala

🔭
Lets build something useful
View GitHub Profile
@jpalala
jpalala / README.md
Created October 6, 2015 02:12 — forked from kfatehi/README.md
Logstash Install
@jpalala
jpalala / git-aliases.md
Created November 26, 2015 09:42 — forked from mwhite/git-aliases.md
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc
@jpalala
jpalala / Gulpfile.js
Created December 9, 2015 09:00 — forked from laracasts/Gulpfile.js
PHPSpec auto-testing Gulpfile
var gulp = require('gulp');
var phpspec = require('gulp-phpspec');
var run = require('gulp-run');
var notify = require('gulp-notify');
gulp.task('test', function() {
gulp.src('spec/**/*.php')
.pipe(run('clear'))
.pipe(phpspec('', { notify: true }))
.on('error', notify.onError({
@jpalala
jpalala / hubot-digitalocean.md
Created December 26, 2015 04:30 — forked from trdarr/hubot-digitalocean.md
Deploying Hubot on DigitalOcean (with Slack integration)
@jpalala
jpalala / backbone-video.js
Created December 28, 2015 16:04 — forked from mdellavo/backbone-video.js
A Backbone app to render a youtube embed and list of thumbnails of videos responding to callbacks
var Video = Backbone.Model.extend({});
var VideoList = Backbone.Collection.extend({
model: Video,
url: '/videos'
});
var VideoPlayerView = Backbone.View.extend({
id: 'video-player',
className: 'video-player',
@jpalala
jpalala / web-servers.md
Created January 14, 2016 05:56 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@jpalala
jpalala / redis.conf
Created January 19, 2016 11:00 — forked from hvasconcelos/redis.conf
Redis Centos Configuration file
# Redis configuration file example
# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes
@jpalala
jpalala / mocha-guide-to-testing.js
Created January 25, 2016 07:02 — forked from samwize/mocha-guide-to-testing.js
Explain Mocha's testing framework - describe(), it() and before()/etc hooks
// # Mocha Guide to Testing
// Objective is to explain describe(), it(), and before()/etc hooks
// 1. `describe()` is merely for grouping, which you can nest as deep
// 2. `it()` is a test case
// 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run
// before/after first/each it() or describe().
//
// Which means, `before()` is run before first it()/describe()
@jpalala
jpalala / redis-autostart-osx.md
Created January 29, 2016 03:08 — forked from subfuzion/redis-autostart-osx.md
redis auto start OS X

Install with Homebrew

brew install redis

Set up launchctl to auto start redis

$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents

/usr/local/opt/redis/ is a symlink to /usr/local/Cellar/redis/x.y.z (e.g., 2.8.7)

@jpalala
jpalala / funky-search.el
Created February 11, 2016 10:59 — forked from aaronbieber/funky-search.el
Emacs jump to PHP function.
;; This is an attempt to mimic what the "CtrlP Funky" plug-in
;; for Vim does, allowing a "fuzzy search" of functions within
;; the current buffer.
;;
;; Because this uses completing-read (in my config., this is
;; handled by helm, which is awesome), it isn't actually
;; "fuzzy," but it gets the job done.
;;
;; Note: This is my first real attempt at writing elisp so it
;; might not be "proper."