Skip to content

Instantly share code, notes, and snippets.

View nateritter's full-sized avatar
🎯
Focusing

Nate Ritter nateritter

🎯
Focusing
View GitHub Profile
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@mystix
mystix / setup-php-dev.sh
Last active April 27, 2023 15:46
(OSX 10.7.x/10.8.x + Homebrew + nginx + mysql + php 5.4 + php-fpm + apc + xdebug) development environment
#!/bin/bash
# install homebrew's official php tap
brew tap josegonzalez/homebrew-php
# install homebrew-dupes (required to install zlib, php54's dependency)
brew tap homebrew/dupes
# install nginx + mysql + php 5.4 + php-fpm + apc + xdebug
brew install nginx mysql
@sud0n1m
sud0n1m / caddy.sh
Created September 11, 2012 00:43
Caddy -> Pump data into Customer.io from CSV
#!/bin/bash
echo "Caddy v 0.1 from Customer.io"
ENDPOINT="https://app.customer.io/api/v1/customers/"
SITEID="YOUR SITE ID"
APIKEY="YOUR API KEY"
INPUT=users.csv
OLDIFS=$IFS
@MrDrews
MrDrews / Default.sublime-theme
Created April 22, 2013 13:41
Solarized (light) -- Complement the stock Solarized (light) theme in sublime text 3 by placing this `Default.sublime-theme` inside the `Packages/User` folder. It will recolor the sidebar.
[
{
"class": "sidebar_container",
// $base02: #073642
"layer0.tint": [7,54,66],
"layer0.opacity": 1.0,
"layer0.draw_center": false,
"layer0.inner_margin": [0, 0, 1, 0],
"content_margin": [0, 0, 1, 0]
@MrDrews
MrDrews / Default.sublime-theme
Created April 24, 2013 14:56
Solarized (dark) -- Complement the stock Solarized (dark) theme in sublime text 3 by placing this `Default.sublime-theme` inside the `Packages/User` folder. It will recolor the sidebar.
[
{
"class": "sidebar_container",
// $base01: #586e75
"layer0.tint": [88,110,117],
"layer0.opacity": 1.0,
"layer0.draw_center": false,
"layer0.inner_margin": [0, 0, 1, 0],
"content_margin": [0, 0, 1, 0]
@duellsy
duellsy / gulpfile.js
Created February 20, 2014 23:52
Laravel auto testing gulp
var gulp = require('gulp');
var sass = require('gulp-sass');
var minifycss = require('gulp-minify-css');
var autoprefixer = require('gulp-autoprefixer');
var phpunit = require('gulp-phpunit');
var notify = require('gulp-notify');
var gutil = require('gulp-util');
var exec = require('child_process').exec;
var sys = require('sys');
var livereload = require('gulp-livereload');
/**
* Open file.csv and read all lines
**/
var fs = require('fs');
var casper = require('casper').create({
verbose: true,
logLevel: 'error',
pageSettings: {
@brandonferens
brandonferens / loadRelativeAssets.php
Created August 20, 2014 20:23
Load relative javascript assets based on route in Laravel
function loadRelativeAssets()
{
$routeArray = explode('.', Route::currentRouteName());
// We take the current route, create an array form it, run it
// through the while statement checking to see if that file exists.
// If it does, we load it. Then we remove that last element
// from the array, and do it all again, until the array is empty
while (!empty($routeArray)) {
// Create the path to the js file
@njh
njh / install-rbenv.sh
Last active March 21, 2021 23:55
Install/update rbenv
# Download rbenv
if [ ! -d ~/.rbenv ]; then
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
fi
cd ~/.rbenv
git reset --hard
git pull origin master
@soufianeEL
soufianeEL / laravel.js
Last active June 18, 2023 05:25 — forked from JeffreyWay/laravel.js
You use Laravel 5 and you want to send a DELETE request without creating a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. To use, import script, and create a link with the `data-method="DELETE"` and `data-token="{{csrf_token()}}"` attributes.
/*
Exemples :
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}">
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}" data-confirm="Are you sure?">
*/
(function() {