Skip to content

Instantly share code, notes, and snippets.

View collinprice's full-sized avatar

Collin Price collinprice

View GitHub Profile
@collinprice
collinprice / awesome-php.md
Created October 31, 2012 22:05 — forked from ziadoz/awesome-php.md
Awesome PHP Libraries
+(id)sharedInstance {
static dispatch_once_t p = 0;
__strong static id _sharedObject = nil;
dispatch_once(&p, ^{
_sharedObject = [[self alloc] init];
});
return _sharedObject;

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPad

Consumer key: CjulERsDeqhhjSme66ECg

@collinprice
collinprice / gist:5259850
Created March 28, 2013 01:52
Install ifeffit on debian squeeze
Add repos to /etc/apt/sources.list
---- Debian (choose your distribution)
deb http://debian-xray.iit.edu etch main contrib non-free
deb http://debian-xray.iit.edu lenny main contrib non-free
Install pgplot5
http://ftp.debian.org/debian/pool/non-free/p/pgplot5/
<?php
$b = false;
if ($b) {
function doit() {
echo "one";
}
}
@collinprice
collinprice / gist:5783748
Created June 14, 2013 17:29
Ubuntu Install
sudo apt-get install vlc chromium-browser git subversion filezilla vim qbittorrent
dropbox
sublime text 2
# Go to the directory
cd trunk/
# Add just the single file to the current directories ignore list (like above)
# Note the dot at the end of the command is important
svn propset svn:ignore secret.txt .
# See that things worked
svn propget svn:ignore . # Notice the single file was added to the list
svn status --no-ignore # You should see an 'I' next to the ignored files
@collinprice
collinprice / gist:5884781
Last active December 19, 2015 02:39
C++ Notes
// Create/Remove directories
#include <sys/stat.h>
// #include <sys/types.h> // Only needed if you want access to mode_t type
mkdir("folder", 0755);
rmdir("folder");
// Uniform Random
@collinprice
collinprice / gist:5923790
Created July 3, 2013 23:34
Wordpress broken due to enabling permalinks
Check .htaccess permissions. Should be 644.
@collinprice
collinprice / gist:5924576
Created July 4, 2013 02:55
Wordpress Divided Menu
function slice_menu($menu_name) {
if ( ( $locations = get_nav_menu_locations() ) && isset( $locations[ $menu_name ] ) ) {
$menu = wp_get_nav_menu_object( $locations[ $menu_name ] );
$menu_items = wp_get_nav_menu_items($menu->term_id);
$menu_list = '<dl class="sub-nav">';
$menu_counter = count($menu_items);
foreach ( (array) $menu_items as $key => $menu_item ) {
$title = $menu_item->title;