Skip to content

Instantly share code, notes, and snippets.

View ErikFontanel's full-sized avatar

Erik Gelderblom ErikFontanel

View GitHub Profile
@numtel
numtel / ec2-rai-node.md
Last active May 12, 2019 22:18
Install rai_node on EC2 Ubuntu instance

Follow these instructions to start an EC2 instance running Ubuntu that will run rai_node on startup

  1. Select Ubuntu Server 16.04 LTS (HVM), SSD Volume Type. A t2.small or larger instance type is recommended.

  2. Configure the security group to match the screenshot.

  3. Download install_rai_node.sh below, update the URLs with their latest versions.

    Get latest rai_node archive URL from https://github.com/clemahieu/raiblocks/releases.

    Get latest gdrive-linux-x64 version URL from https://github.com/prasmussen/gdrive#downloads

@ttscoff
ttscoff / karabiner.json
Created July 25, 2017 17:09
Example Karabiner Elements setup for Vim navigation keys using Hyper+h/j/k/l
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_adisk._tcp</type>
<txt-record>sys=waMa=0,adVF=0x100</txt-record>
<txt-record>dk0=adVN=Time Capsule,adVF=0x82</txt-record>
</service>
<service>
@peterdemartini
peterdemartini / command.sh
Last active September 19, 2024 15:14
Exclude node_modules in timemachine
find `pwd` -type d -maxdepth 3 -name 'node_modules' | xargs -n 1 tmutil addexclusion
@elomagic
elomagic / timemachine-install.sh
Last active May 1, 2020 18:14
Script for installing a Time Machine server
#!/bin/bash
#title : timemachine-install.sh
#description : Script for installing a Time Machine server.
#more : http://www.elomagic.de
#author : Carsten Rambow
#date : 2016-12-02
#usage : /bin/bash timemachine-install.sh
#tested-distros : Ubuntu Server 16.10, Raspbian (Based on Debian)
TIMEMACHINE_USER="timemachine"
<!--
* Liquid Snippet for generating responsive image srcsets based on Shopify's native image transforms.
* Published June 17, 2016 by Joseph Bergdoll
* www.extendedplay.nyc
*
* Full list of Shopify's generated image transforms:
* https://ecommerce.shopify.com/c/ecommerce-design/t/very-important-please-read-new-image-sizes-supported-up-to-2048x2048-for-retina-support-110766
*
* Simply include it within your image element, define the `image`, and the maximum size.
* Product Images and Theme Asset Images should have either `product: 'true'` or `asset: 'true'` declared, respectively.
@patrickpietens
patrickpietens / gist:36a068100e1c3d5d6b9d
Created March 30, 2015 10:31
Mediaquery mixin to rule them all
$breaks: (
"small": (min: 0em, max: 34.99em),
"normal": (min: 35em, max: 47.99em),
"wide": (min: 48em, max: 64.99em),
"widest": (min: 65em, max: null)
);
@mixin only-responds-to($breakpoint, $portrait: false) {
$myBreakpoint: map-get($breaks, $breakpoint);
$myMin: map-get($myBreakpoint, min);
@bomberstudios
bomberstudios / Add @3x.sketchplugin
Last active July 8, 2016 12:27
Add @3x resolution to existing Sketch documents
// This plugin will add a @3x size to all existing slices and exportable layers,
// that already have a @1x and @2x size
var p = [doc pages]
for (var i = 0; i < [p count]; i++) {
var current_page = [p objectAtIndex:i]
var exportable_layers = [current_page exportableLayers]
for (var l = 0; l < [exportable_layers count]; l++) {
var slice_or_layer = [exportable_layers objectAtIndex:l]
if ([slice_or_layer exportOptions]) {
@jacobwise
jacobwise / Advanced Custom Fields and JSON API
Last active November 1, 2017 13:11
How to add Advance Custom Fields to the JSON API in WordPress.
<?php
add_filter('json_api_encode', 'json_api_encode_acf');
function json_api_encode_acf($response)
{
if (isset($response['posts'])) {
foreach ($response['posts'] as $post) {
json_api_add_acf($post); // Add specs to each post
}
@fabrizim
fabrizim / acf-customizer-patch.php
Last active January 17, 2024 02:30
Plugin to allow for Advanced Custom Fields to be used in widgets within the Customizer
<?php
/*
Plugin Name: ACF Customizer Patch
Plugin URI: https://gist.github.com/fabrizim/9c0f36365f20705f7f73
Description: A class to allow acf widget fields to be stored with normal widget settings and allow for use in customizer.
Author: Mark Fabrizio
Version: 1.0
Author URI: http://owlwatch.com/
*/
class acf_customizer_patch