Skip to content

Instantly share code, notes, and snippets.

@novemberborn
novemberborn / setup.md
Created January 7, 2016 14:28
OS X Dnsmasq setup for .dev domains

Install dnsmasq using Homebrew. Edit the dnsmasq.conf file (Homebrew will tell you where to put it) to contain:

address=/.dev/127.0.0.1
listen-address=127.0.0.1

Then make sure Dnsmasq is running (again follow Homebrew instructions).

Create the /etc/resolver/dev directory (using root) if it doesn't exist yet and create a resolver for .dev:

@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active October 6, 2025 20:22
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@facine
facine / __INDEX.txt
Last active August 28, 2024 05:45
Drupal 8 - Examples
# Taxonomy terms:
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_taxonomy_term-php
# Menu links:
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_menu_link-php
# File items:
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_file-php
# Nodes:
@rachellawson
rachellawson / creategif
Last active September 1, 2015 13:07
Create a d.o compatible mini movie gif rather than a static screenshot
#!/bin/sh
# Create an animated GIF of a screen recording to upload to d.o
# Usage: creategif input_file.mp4 output_file.gif
# As described at http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
palette="/tmp/palette.png"
filters="fps=15,scale=1280:-1:flags=lanczos"
@ja-k-e
ja-k-e / Sass CSS4 Variable Manipulation.markdown
Last active November 25, 2022 18:34
Sass CSS4 Variable Manipulation
@jakecleary
jakecleary / gulpfile.js
Last active February 23, 2017 19:20
gulpfile.js
// Dependencies
// ============
var gulp = require('gulp'),
// Styles
sass = require('gulp-sass'),
autoprefix = require('gulp-autoprefixer'),
minify = require('gulp-minify-css'),
rename = require('gulp-rename'),
@AkshayKalose
AkshayKalose / ajax_example.info.yml
Last active November 23, 2022 13:40
Drupal 8 - Ajax Example
name: 'Ajax Example'
description: 'Just an Ajax Example'
core: 8.x
type: module
@felipeskroski-zz
felipeskroski-zz / degToCard.js
Last active February 24, 2022 20:27
Javascript function to convert wind direction in degrees to cardinal.
var degToCard = function(deg){
if (deg>11.25 && deg<=33.75){
return "NNE";
}else if (deg>33.75 && deg<=56.25){
return "ENE";
}else if (deg>56.25 && deg<=78.75){
return "E";
}else if (deg>78.75 && deg<=101.25){
return "ESE";
}else if (deg>101.25 && deg<=123.75){
@yanniboi
yanniboi / ymca.txt
Created September 11, 2014 08:32
Morning exercise
\o/
/ǒ\
/o/
/o\