Skip to content

Instantly share code, notes, and snippets.

Avatar

Adrienne L. Travis adrienne

View GitHub Profile
@adrienne
adrienne / fix.css
Last active Jun 18, 2020
Fix Stupid Shit on New Twitter
View fix.css
/* Install the STYLUS extension (not STYLISH, that one's got malware these days)
Stylus for Chrome: https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne
Stylus for FF: https://addons.mozilla.org/en-US/firefox/addon/styl-us/
Once it's installed, go to Twitter, click the button, and choose:
Create a new style -> for all URLs at twitter.com
Paste this code into the created style, then save!
*/
@adrienne
adrienne / gist:3977777
Created Oct 30, 2012
How to follow an organization on gitHub
View gist:3977777
Paste this into the console in your browser:
$.post("https://github.com/users/follow?target=organizationName");
@adrienne
adrienne / php.ini
Created Jun 21, 2013
PHP .ini file
View php.ini
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@adrienne
adrienne / NerderyVPN.bat
Created May 23, 2012
A batch file to connect to the VPN and mount the network storage as a drive
View NerderyVPN.bat
@echo off
if exist n:\home goto DISCONNECTME else goto CONNECTME
:CONNECTME
REM NOTE: in all of the below variables EXCEPT for mydrivename , double-quote the values!
REM This is the name of the VPN you've got set up
set myvpnname="Name of your VPN connection"
View .htaccess
# ----------------------------------------------------------------------
# 5G BLACKLIST/FIREWALL (2013)
# @ http://perishablepress.com/5g-blacklist-2013/
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# 5G:[QUERY STRINGS]
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteEngine On
@adrienne
adrienne / quixCommands.txt
Last active Oct 3, 2018
Commands for the truly awesome Quix bookmarklet
View quixCommands.txt
> Killing the default commands
> Note that ALL spaces must be removed from bookmarklets, and %-encoded characters must be changed back to normal.
#kill-defaults
> Begin new commands (many copied from original Quix)
@Searching
ama https://www.amazon.com/s/?field-keywords=%s Amazon Search
@adrienne
adrienne / adrienne-utilities.htaccess
Created Oct 4, 2011
A handy set of .htaccess declarations that I can pick and choose from for various projects
View adrienne-utilities.htaccess
SetEnv APPLICATION_ENV development
SetEnv DEBUG_FIREPHP enabled
# Access in PHP:
# // Define application environment
# defined('APPLICATION_ENV') || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
# // Enable FirePHP for testing?
# defined('DEBUG_FIREPHP') || define('DEBUG_FIREPHP', (getenv('DEBUG_FIREPHP') ? getenv('DEBUG_FIREPHP') : 'disabled'));
Options All -Indexes
Options +FollowSymLinks
@adrienne
adrienne / gist:3180103
Created Jul 26, 2012
Haversine formula (PHP/MySQL)
View gist:3180103
/**
* Generates the string for the Haversine function. We assume that the `zipcode`, `latitude`,
* and `longitude` columns are named accordingly. We are also not doing much error-checking
* here; this is a simple text cruncher to make things prettier.
* We may also be integrating some extra SQL in, passed in via the $extra parameter
*
* @param string $table The table to search in
* @param float $lat The latitude part of the reference coordinates
* @param float $lng The longitude part of the reference coordinates
* @param int $radius The radius to search within
@adrienne
adrienne / speakers.md
Last active Jun 10, 2017
Speaker Information, LambdaConf 2017
View speakers.md

All LambdaConf 2017 speakers listed as Invited (rather than double-blinded committee selection):

Keynotes:

  • Edward Latimore
  • Paul Phillips

Leap Workshops:

  • Dana Scott
@adrienne
adrienne / Useful SQL snippets
Last active Feb 8, 2016
Useful SQL snippets
View Useful SQL snippets
Various handy bits and bobs relating to SQL (and the mySQL RDBMS in particular).
# Dump all databases from CLI:
$ mysqldump -h [server] -u root --password=password --default-character-set=utf8 --set-charset --all-databases > all_dbs.sql
# Restore all databases from CLI:
$ mysql -u root --password=password --default-character-set=utf8 --set-charset < all_dbs.sql
You can’t perform that action at this time.