Skip to content

Instantly share code, notes, and snippets.

@daneden
daneden / bread.md
Last active October 21, 2017 09:04

Hearth Loaf

This bread takes about two days to make. The recipe seems long, but it’s just detailed. The steps are also very catered to my own schedule, so you should play around with the steps, making use of your refrigerator, to see what works for you.

Also, this recipe is basically a direct copy of a recipe in Josey Baker’s excellent book on making bread, and I implore you to buy it and read it.

Stuff you’ll need

  • Store-bought yeast (I use dry active)
  • Whole wheat flour
@AungMyoKyaw
AungMyoKyaw / Ubuntu-Compass-ruby[16.04]
Created May 30, 2016 16:44
Compass installation for ubuntu 16.04
[https://gist.github.com/stephou0104/233b5c99884f1d8c8b8b#file-ubuntu-compass-ruby]
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
@iandunn
iandunn / log-wp-rest-api-errors.php
Last active February 27, 2019 22:41
Log WordPress REST API errors
<?php
/**
* Log REST API errors
*
* @param WP_REST_Response $result Result that will be sent to the client.
* @param WP_REST_Server $server The API server instance.
* @param WP_REST_Request $request The request used to generate the response.
*/
function log_rest_api_errors( $result, $server, $request ) {
@stephanetimmermans
stephanetimmermans / ubuntu-compass-ruby
Last active July 4, 2019 12:48
Install Compass+Ruby on Ubuntu 14.04
#https://gorails.com/setup/ubuntu/14.04
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.2
rvm use 2.1.2 --default
@ericrasch
ericrasch / is_child.php
Last active October 29, 2019 16:18
WordPress conditional function to check if a page is a parent/child/ancestor. In other words, if the page is within a tree of another page, show the code. Other code I've seen either only work with IDs, only check if it's a child, or detect all subpages (even outside of the direct tree).
/* =BEGIN: Check If Page Is Child
Source: http://bavotasan.com/2011/is_child-conditional-function-for-wordpress/
---------------------------------------------------------------------------------------------------- */
function is_child( $page_id_or_slug ) { // $page_id_or_slug = The ID of the page we're looking for pages underneath
global $post; // load details about this page
if ( !is_numeric( $page_id_or_slug ) ) { // Used this code to change a slug to an ID, but had to change is_int to is_numeric for it to work.
$page = get_page_by_path( $page_id_or_slug );
$page_id_or_slug = $page->ID;
}
@mickm
mickm / update-pingdom-iptables.sh
Created November 21, 2012 20:21
Whitelist Pingdom probe-servers in iptables.
#!/bin/bash
#
# Whitelist Pingdom probe-servers in iptables.
#
# Create a chain called "PINGDOM" and jump to it somewhere before
# the final REJECT/DROP, e.g.
#
# # New chain for Pingdom rules
# :PINGDOM - [0:0]
#
@benwillkommen
benwillkommen / _readme.md
Last active June 27, 2022 21:27
Unsubscribe from all watched repositories in a particular organization

Remove All Subscriptions from a Specific Github Organization

This script will delete all the subscriptions in your account for the Github Organization passed to it.

This script was created when I took a new job, and my notification settings inadvertantly subscribed me to all 600+ of their repos. I wanted a better signal to noise ratio in my notifications, but I didn't want to click the "Unwatch All" button, which would remove my subscriptions to repos outside my new employer's org.

How To

  1. Create a Personal Access Token with the "repo" scope, and expose it as the GITHUB_PERSONAL_ACCESS_TOKEN environment variable:
$ export GITHUB_PERSONAL_ACCESS_TOKEN=
@willprice
willprice / .travis.yml
Last active August 15, 2023 17:12
How to set up TravisCI for projects that push back to github
# Ruby is our language as asciidoctor is a ruby gem.
lang: ruby
before_install:
- sudo apt-get install pandoc
- gem install asciidoctor
script:
- make
after_success:
- .travis/push.sh
env:
<?php
/*
Plugin Name: Programmatically add Gravity Forms
Plugin URI: https://daan.kortenba.ch/programmatically-add-gravity-forms/
Description: Programmatically add persistent Gravity Forms forms.
Author: Daan Kortenbach
Version: 0.1
Author URI: https://daan.kortenba.ch/
License: GPLv2 or later
*/
@clintel
clintel / gist:1155906
Created August 19, 2011 02:40
Fenced code in bullet lists with GitHub-flavoured MarkDown??

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code