Skip to content

Instantly share code, notes, and snippets.

View yesdevnull's full-sized avatar

Dan Barrett yesdevnull

View GitHub Profile
@yesdevnull
yesdevnull / demo.html
Created September 25, 2015 10:01
Rapid prototyping with Bootstrap demo HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Learning Bootstrap</title>
<!-- Core Bootstrap -->

Keybase proof

I hereby claim:

  • I am yesdevnull on github.
  • I am yesdevnull (https://keybase.io/yesdevnull) on keybase.
  • I have a public key whose fingerprint is 8FA7 5DE7 F9F9 57D6 E4C3 878C F873 99AA C400 7A9F

To claim this, I am signing this object:

@yesdevnull
yesdevnull / VerifyCsrfToken.php
Created February 19, 2015 10:47
Using X-XSRF-TOKENs for AJAX in Laravel 5 - Option 2
<?php namespace App\Http\Middleware;
use Closure;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
use Symfony\Component\Security\Core\Util\StringUtils;
class VerifyCsrfToken extends BaseVerifier {
/**
* Handle an incoming request.
@yesdevnull
yesdevnull / Gruntfile.js
Created February 5, 2015 02:38
Getting Started with Grunt article: set up package.json, uglify, and Sass tasks.
module.exports = function(grunt) {
// This is where our tasks go
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
preserveComments: 'some'
},
core_dev: {
options: {
@yesdevnull
yesdevnull / Gruntfile.js
Created February 5, 2015 02:03
Getting Started with Grunt article: basic Gruntfile and package.json
module.exports = function(grunt) {
// This is where our tasks go
grunt.initConfig({
pkg: grunt.file.readJSON('package.json')
});
// Load tasks from the installed modules
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-sass');
@yesdevnull
yesdevnull / Gruntfile.js
Created February 5, 2015 01:54
Getting Started with Grunt article: set up package.json and uglify task.
module.exports = function(grunt) {
// This is where our tasks go
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
preserveComments: 'some'
},
core_dev: {
options: {
@yesdevnull
yesdevnull / gist:9776941
Created March 26, 2014 04:28
OS X Caching Server 2 RRDtool Graph
rrdtool graph - --slope-mode -P --imgformat PNG --height 180 --title "<big><b>Caching Server 2 - Usage &amp; Package Count</b></big>" --vertical-label "<b>Cache Size</b>" --right-axis-label "<b># Of Packages</b>" DEF:cacheUsed=rrd_source:ds_source_1:AVERAGE DEF:cacheLimit=rrd_source:ds_source_3:AVERAGE DEF:numberOfPkgs=rrd_source:ds_source_6:AVERAGE DEF:macAppsUsage=rrd_source:ds_source_7:AVERAGE DEF:iosAppsUsage=rrd_source:ds_source_8:AVERAGE DEF:ibooksUsage=rrd_source:ds_source_9:AVERAGE DEF:otherUsage=rrd_source:ds_source_12:AVERAGE CDEF:otherUsedPerc=otherUsage,cacheUsed,/,100,* CDEF:ibooksUsagePerc=ibooksUsage,cacheUsed,/,100,* CDEF:iosAppsUsagePerc=iosAppsUsage,cacheUsed,/,100,* CDEF:macAppsUsagePerc=macAppsUsage,cacheUsed,/,100,* CDEF:otherUsedTotalPerc=otherUsage,cacheLimit,/,100,* CDEF:ibooksUsageTotalPerc=ibooksUsage,cacheLimit,/,100,* CDEF:iosAppsUsageTotalPerc=iosAppsUsage,cacheLimit,/,100,* CDEF:macAppsUsageTotalPerc=macAppsUsage,cacheLimit,/,100,* CDEF:cacheLimitGB=cacheLimit,1000000000,/ CDEF:
@yesdevnull
yesdevnull / import_users.sh
Last active July 31, 2018 20:09
Use this script to import users into an Open Directory domain on OS X Mavericks Server with users in a CSV.
#!/bin/bash
# Import Users into an Open Directory Domain
# by Dan Barrett
# http://yesdevnull.net
# You may need to change the details below depending on your configuration
# and settings
# Arguments:
@yesdevnull
yesdevnull / Users.csv
Last active May 15, 2022 03:20
Use this script to import users into an Open Directory domain on OS X Mavericks Server with users in a CSV. The Users.csv file is an example file to show you the structure expected.
Joe Smith 123456 147852
Bill Jones 987654 369852
Steve Miller 654321 852147
@yesdevnull
yesdevnull / gist:6669570
Created September 23, 2013 12:03
RRDtool graph for GroundWork's check_disk command.
rrdtool graph - \
-E \
-P \
-h 180 \
-l 0 \
--grid-dash 1:2 \
-t "<big><b>Disk Utilisation</b></big>" \
-b 1024 \
-X 0 \
-a PNG \