- Create your own start.conf:
- Open Surge for iOS, Tap Download Configuration from URL, input the template config URL: https://gist.githubusercontent.com/raecoo/0b9d2fc731c80315fb11/raw/19339cfc0ce06c66dec5416433ef407c5c0b568c/service.conf
- Download rules.conf
- Open Surge for iOS, Tap Download Configuration from URL, input the config URL: https://gist.githubusercontent.com/raecoo/0b9d2fc731c80315fb11/raw/19339cfc0ce06c66dec5416433ef407c5c0b568c/rules.conf
- Tap start.conf in the configuration list, then tap Start button.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<pre><?php | |
// WordPress Multisite - Delete all revisions from all posts in a netword. | |
// Quick hack by @mrazzari, 2014. | |
// For context see this thread started by Kitchin at the forums: | |
// http://wordpress.org/support/topic/deleting-post-revisions-do-not-use-the-abc-join-code-you-see-everywhere | |
// HOWTO | |
// This snippet is meant to be called as a standalone script. | |
// Like http://example.com/tmp/multisite_delete_revisions.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Database Name: " | |
read -e dbname | |
echo "Database User: " | |
read -e dbuser | |
echo "Database Password: " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// WordPress stores the site URL in the database by default (which I have never | |
// understood), and it's a pain to have to type out the UPDATE SQL or search in | |
// phpMyAdmin to change it. This is a simple way to put the URL into | |
// wp-config.php instead. | |
// Note that you will still need to update any URLs that appear in the content, | |
// especially when you copy a database from a development site to production: | |
// https://gist.github.com/davejamesmiller/a8733a3fbb17e0ff0fb5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function __construct( $config ) { | |
$this->providers = $config['providers']; | |
$this->provider = $config['provider']; | |
// Actions and filters here | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Common styles for all types */ | |
.bs-callout { | |
padding: 20px; | |
margin: 20px 0; | |
border: 1px solid #eee; | |
border-left-width: 5px; | |
border-radius: 3px; | |
} | |
.bs-callout h4 { | |
margin-top: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
# Dispatch - synchronize two folders | |
import os | |
import filecmp | |
import shutil | |
from stat import * | |
class Dispatch: | |
''' This class represents a synchronization object ''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://technet.microsoft.com/en-us/library/ee692685.aspx | |
# F7 = history | |
# Alt+F7 = history -c | |
# F8 = Ctrl+R | |
Set-Location C: | |
# Easier navigation | |
Set-Alias o start | |
function oo {start .} |
This gist is for showing an example of a custom wordpress menu.
If you want to get more from the menu item simply have a look at the $item object. i.e:
// Will return a large object with lots of props like title, url, description, id etc.
var_dump( $item );
This code works on Wordpress 4.1.1 as of 31st of March 2015
OlderNewer