Skip to content

Instantly share code, notes, and snippets.

View rachelbaker's full-sized avatar

Rachel Baker rachelbaker

View GitHub Profile
@cayuu
cayuu / MuteRdioAds.js
Last active April 12, 2017 02:01
Mute Rdio Ads (copy + paste into browser console) [24 Oct 2013]
var r = R.player, oVol = r.volume(), tf = r._onTrackFinished, ar = r._onAudioReady, n = r._next;
r._onTrackFinished = function() {
return .001 !== r.volume() && (oVol = r.volume()), r.volume(.001), tf.apply(this, arguments);
};
r._onAudioReady = function() {
return r.playingAd() || r.volume(oVol), ar.apply(this, arguments);
};
@fideloper
fideloper / install.sh
Last active October 30, 2023 20:03
Vagrant Provisioning Script for PHP applications. This installs a LAMP stack.
#!/usr/bin/env bash
echo ">>> Starting Install Script"
# Update
sudo apt-get update
# Install MySQL without prompt
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
@nacin
nacin / auto-update.php
Last active March 11, 2019 17:17
This is how @dd32 and I test automatic background updates in WordPress 3.7. Then just do example.com/?wp_maybe_auto_update. (If you use a checkout of develop.svn.wordpress.org, you can run this on the `build` directory, then simply run `grunt copy` between updates to copy over the latest code from `src`. This is how we are able to make adjustmen…
<?php
// Add this as a mu-plugin.
if ( isset( $_GET['wp_maybe_auto_update'] ) ) {
add_filter( 'automatic_updates_is_vcs_checkout', '__return_false' );
add_action( 'template_redirect', function() {
$time = date( 'r' );
echo "Starting... $time<br />";
delete_site_option( 'auto_core_update_failed' );
@sangar82
sangar82 / gist:6775001
Last active December 24, 2015 09:09
Laravel + Vagrant + Sublime Text 2 + XDEBUG
Info xdebug martomo plugin
https://github.com/martomo/SublimeTextXdebug/issues/39
php.ini.erb (vagrant)
<% if use_xdebug != "0" %>
[xdebug]
xdebug.remote_enable=1
xdebug.remote_port=9001
@toolmantim
toolmantim / Makefile
Last active December 5, 2022 23:14
An example of using Make instead of Grunt for fast, simple and maintainable front-end asset compilation.
# A simple Makefile alternative to using Grunt for your static asset compilation
#
## Usage
#
# $ npm install
#
# And then you can run various commands:
#
# $ make # compile files that need compiling
# $ make clean all # remove target files and recompile from scratch
@markjaquith
markjaquith / gist:5922095
Created July 3, 2013 19:45
AppleScript for App Tamer that wakes Dropbox for 60 seconds, then sleeps it again. Note that you have to have enabled AutoStop for Dropbox already. Set this to run every X minutes on a cron, for fun and profit. Increase the delay if you think it will need more time to sync on a slow connection.
tell application "App Tamer"
wake "Dropbox"
delay 60
# Hack to get App Tamer to sleep Dropbox again
# There is no "sleep" verb ಠ_ಠ
autostop false
autostop true
end tell
@rachelbaker
rachelbaker / install-handlebars.md
Created May 29, 2013 13:58
Instructions for installing Node NPM and Handlebars on OSX
require "net/https"
require "uri"
require "JSON"
uri = URI.parse("https://api.github.com/users/redbush")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri.request_uri)
response = http.request(request)
@rachelbaker
rachelbaker / install-yeoman-osx.md
Last active October 4, 2019 21:33
Instructions for installing Node NPM and Yeoman on OSX
@raideus
raideus / acf-auto-export.php
Created March 7, 2013 06:00
This collection of functions completely automates the "Export to PHP" feature of Advanced Custom Fields. No more manual copy + pasting! Simply specify an absolute file path (line 17) and the code will automatically write the ACF data to the file. The export is initiated whenever you publish a new field group or save changes to an existing field …
<?php
/**
* Automated PHP export for Advanced Custom Fields
*
* Export is initiated whenever an admin publishes a new field group
* or saves changes to an existing field group.
*
* Place this code in your theme's functions.php file.
*
*/