Skip to content

Instantly share code, notes, and snippets.

View nateritter's full-sized avatar
🎯
Focusing

Nate Ritter nateritter

🎯
Focusing
View GitHub Profile
@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
@adamwathan
adamwathan / belongs-to-many.sublime-snippet
Last active October 19, 2020 16:59
Eloquent Relationship snippets for Sublime Text
<snippet>
<content><![CDATA[
public function ${1:relationship}()
{
return \$this->belongsToMany(${1/^(.+)$/(?1\u$1:)/g}::class, {$2:table});
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>belt</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@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]
@alexmac05
alexmac05 / gist:efef7a557fcc7ccc89bd17b5ac3cb1a9
Created April 19, 2018 14:57
HelloSign - Overriding the app white labelling settings when doing the embedded iframe loading in JavaScript
HelloSign.init("<?php echo $client_id ?>");
HelloSign.open({
url: "<?php echo $sign_url ?>",
allowCancel: true,
skipDomainVerification: true,
/**
* Open file.csv and read all lines
**/
var fs = require('fs');
var casper = require('casper').create({
verbose: true,
logLevel: 'error',
pageSettings: {
@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
@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
@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');