Skip to content

Instantly share code, notes, and snippets.

View xurizaemon's full-sized avatar
🌻
SPRING

Chris Burgess xurizaemon

🌻
SPRING
View GitHub Profile
@xurizaemon
xurizaemon / drupal-uid1-login.php
Created August 25, 2012 20:56
Authenticate as Drupal UID=1
if ($_GET['x'] == 'SECRET') {
global $user;
$user = user_load(1);
drupal_session_regenerate();
drupal_set_message('Authenticated.');
drupal_goto('admin');
}
@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."**
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@1stvamp
1stvamp / mac-curl-ca-bundle.sh
Created March 22, 2012 12:50
Script to install cURL CA certificates on OS X without macports
#!/bin/bash
mkdir /tmp/curl-ca-bundle
cd /tmp/curl-ca-bundle
wget http://curl.haxx.se/download/curl-7.22.0.tar.bz2
tar xzf curl-7.22.0.tar.bz2
cd curl-7.22.0/lib/
./mk-ca-bundle.pl
if [ ! -d /usr/share/curl/ ]; then
sudo mkdir -p /usr/share/curl/
else
@salathe
salathe / results.txt
Created January 24, 2012 20:55
PHP array/string functions haystack/needle ordering
Array functions:
array_search $needle, $haystack
in_array $needle, $haystack
String functions:
strchr $haystack, $needle
stripos $haystack, $needle
stristr $haystack, $needle
strpos $haystack, $needle
strrchr $haystack, $needle