Skip to content

Instantly share code, notes, and snippets.

View kentbrew's full-sized avatar

Kent Brewster kentbrew

View GitHub Profile
@kentbrew
kentbrew / IOS5contacts.txt
Created October 13, 2011 20:15
Recovering Contacts after IOS5 Loses Them
I upgraded to IOS5 last night and turned everything (iCloud, Find My iPhone) on. First thing I noticed this morning was that my contacts were all gone.
If you turned on iCloud and your contacts are missing, try this:
Settings -> iCloud -> Contacts OFF
Keep previously synced iCloud contacts on your phone
(phone will tell you it's turning off iCloud contacts)
Turn Contacts BACK ON
Merge your contacts with iCloud
(phone will tell you it's turning on iCloud contacts)
@kentbrew
kentbrew / chainingFunctionsWithEval.html
Created November 23, 2011 18:39
Chaining JavaScript Functions with Eval
<!doctype html>
<html>
<head><title>Chaining JavaScript Functions with Eval</title></head>
<body>
<p>I was feeling deeply frustrated with my lack of ability to figure out how to do this the Right Way, so here it is in the Wrongest Way Possible.</p>
<script>
var a = function(s) {
@kentbrew
kentbrew / go_sopa_yourself.js
Created January 18, 2012 00:10
Go SOPA Yourself
(function (w, d, a) {
var $ = w[a.k] = {
"a": a, "w": w, "d": d,
"s": {},
"v": {'el': []},
"f": ( function () {
return {
listen : function (el, ev, fn) {
if(typeof $.w.addEventListener !== 'undefined') {
el.addEventListener(ev, fn, false);
@kentbrew
kentbrew / t.js
Created March 4, 2012 05:48
A tiny bookmark hack.
(function(d){alert(d.title);}(document));
@kentbrew
kentbrew / pinterest_embed.html
Created April 2, 2012 23:00
testing Pinterest embed from https
<html>
<head>
<title>Testing</title>
<body>
woo yay
</body>
</html>
@kentbrew
kentbrew / goog_app_specific_passwords.txt
Created April 10, 2012 17:25
Setting Up Application-Specific Passwords in Google Accounts
Just set up 2-factor authorizations for your Google login? Facing puzzling error
messages? Follow this simple set of 24 steps, each and every time one of your apps
fails to sign in:
1: Bring up iCal and feast your eyes upon the following horribly vague error message:
**iCal can't log in to your "Google" account because your password may be incorrect.
The password may have been entered incorrectly. Reenter the password for account
“Google” on the CalDAV server "calendar.google.com."**
@kentbrew
kentbrew / how_to_rotate_an_iphone_movie.md
Last active August 19, 2016 16:36
How to Rotate an iPhone Movie

Here be some notes on the insane set of gymnastics I have to go through every time I fuck up and start recording video with my iPhone held vertically.

I do this a lot. I don't know why it happens. Often I am standing over something and recording it, and the phone doesn't understand that I actually mean to hold it horizontally.

Meta Questions:

Why isn't there a way to prevent the phone from shooting video in vertical format? Who

@kentbrew
kentbrew / chaining-javascript-functions-with-eval
Created July 19, 2012 14:40
Chaining JavaScript Functions with Eval
# Chaining JavaScript Functions with Eval
After a disastrously bad job interview I was feeling frustrated with my lack of ability to figure out how to do this the Right Way, so here it is in the Wrongest Way Possible:
<script>
var a = function(s) {
return s + 'a';
};
@kentbrew
kentbrew / pinning_from_chrome_on_ios.txt
Created September 25, 2012 18:57
Pinning from Chrome on IOS
Pinning from Chrome on IOS
This is fugly but it works. (As soon as Google opens up extensions in Chrome or allows bookmarklets to open in an existing tab, or Apple opens up the Share panel, I'll update.)
Install the bookmarklet:
1) Open up this gist on your iPad.
2) Bookmark this page.
@kentbrew
kentbrew / tinymce_wordpress.txt
Created October 1, 2012 15:46
How to turn off TinyMCE in Wordpress
In wordpress/wp-includes/class-wp-editor.php, look for the tinymce setting:
public static function parse_settings($editor_id, $settings) {
$set = wp_parse_args( $settings, array(
...
'tinymce' => true, // load TinyMCE, can be used to pass settings directly to TinyMCE using an array()
...
) );
Set it to false and you should be good to go.