Skip to content

Instantly share code, notes, and snippets.

💥
🦆

Gareth Jones symm

💥
🦆
Block or report user

Report or block symm

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
@cakper
cakper / pre-commit
Created Jan 29, 2014
PHPSpec GIT pre-commit hook
View pre-commit
#!/bin/sh
if [ -f ./bin/phpspec ]
then
./bin/phpspec run --quiet
if [ $? -ne 0 ]
then
echo "PHPSpec has failed - commit aborted"
return 1
fi
View vboxadd-install.log
grep: /lib/modules/3.10.0-123.4.2.el7.x86_64/build/include/linux/version.h: No such file or directory
make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/3.10.0-123.4.2.el7.x86_64/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
@sstok
sstok / ShortArraySyntaxFixer.php
Last active Aug 29, 2015
ShortArraySyntaxFixer for PHP-CS-Fixer
View ShortArraySyntaxFixer.php
use Symfony\CS\FixerInterface;
use Symfony\CS\Tokens;
class ShortArraySyntaxFixer implements FixerInterface
{
public function fix(\SplFileInfo $file, $content)
{
$tokens = Tokens::fromCode($content);
for ($index = 0, $c = $tokens->count(); $index < $c; $index++) {
@wtnabe
wtnabe / .gitignore
Last active Aug 29, 2015
gulp + coffee + sass + watch + minify + cache buster sample
View .gitignore
/node_modules
*.map
/bower_components
View image2spectrogram.py
#!/usr/bin/python
import cv2
import numpy as np
import wave
import struct
import sys
# usage instructions:
# ./image2spectrogram.py input.png
@ameliaikeda
ameliaikeda / nginx.conf
Created Oct 27, 2014
nginx config for dynamic subdomain:subdirectory mapping
View nginx.conf
user ameliaikeda staff;
worker_processes 2;
error_log /Users/ameliaikeda/dev/error.log info;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
View nginx-update.rb
#!/usr/bin/env ruby
# -*- ruby -*-
# TODO: Intelligently find (maybe even install?) latest REE & passenger.
CONFIG_FLAGS="--with-http_secure_link_module"
REE_VERSION="ruby-enterprise-1.8.7-2010.01"
require 'open-uri'
View pinboard.in.bookmarklet.js
javascript:t='PUT YOUR TAGS HERE';q=location.href;p=document.title;void(t=open('http://pinboard.in/add?later=yes&noui=yes&jump=close&tags='+encodeURIComponent(t)+'&url='+encodeURIComponent(q)+'&title='+encodeURIComponent(p),'Pinboard','toolbar=no,width=100,height=100'));t.blur();
@p01
p01 / LICENSE.txt
Created Oct 6, 2011 — forked from 140bytes/LICENSE.txt
Mandelbrot fractal with zoom & panning in 133 bytes
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri - http://www.p01.org/releases/
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@ryanb
ryanb / index.js.erb
Created Dec 16, 2011
Infinite scrolling solution covered in revised episode #114: http://railscasts.com/episodes/114-endless-page-revised
View index.js.erb
$('#products').append('<%= j render(@products) %>');
<% if @products.next_page %>
$('.pagination').replaceWith('<%= j will_paginate(@products) %>');
<% else %>
$('.pagination').remove();
<% end %>
You can’t perform that action at this time.