Skip to content

Instantly share code, notes, and snippets.

View cliftonlabrum's full-sized avatar

Clifton Labrum cliftonlabrum

View GitHub Profile
@cliftonlabrum
cliftonlabrum / gist:3982934
Created October 30, 2012 20:49
MySQL Memory Fix for Drupal Local Instance on a Mac
-- Make a file at /etc/my.cnf
sudo touch my.cnf
-- File contents:
[mysqld]
max_allowed_packet = 100M
@cliftonlabrum
cliftonlabrum / gist:3982966
Created October 30, 2012 20:52
3D Text with Only CSS
h1 {
text-shadow: 0 1px 0 #ccc,
0 2px 0 #c9c9c9,
0 3px 0 #bbb,
0 4px 0 #b9b9b9,
0 5px 0 #aaa,
0 6px 1px rgba(0,0,0,.1),
0 0 5px rgba(0,0,0,.1),
0 1px 3px rgba(0,0,0,.3),
0 3px 5px rgba(0,0,0,.2),
@cliftonlabrum
cliftonlabrum / tiapp.xml
Created October 30, 2012 20:53
Requirement for a Titanium App that Uses the GPS
<array>
<string>location-services</string>
<string>gps</string>
</array>
@cliftonlabrum
cliftonlabrum / gist:3989119
Created October 31, 2012 19:01
Titanium: Check for iPhone 5
Ti.Platform.displayCaps.platformHeight = 568
@cliftonlabrum
cliftonlabrum / gist:4040290
Last active October 12, 2015 14:27
Different ways to show debug info in Rails
In the controller:
render :text => @some_object.inspect
(your view won't be rendered)
In the view:
<%= debug(@some_object) %>
You could also:
@cliftonlabrum
cliftonlabrum / .gitconfig
Created November 12, 2012 05:21
Add Color to Git in Terminal
[color]
branch = auto
diff = auto
status = auto
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
@cliftonlabrum
cliftonlabrum / gist:4226269
Created December 6, 2012 17:23
Allow Pow and Cisco AnyConnect to Peacefully Coexist
sudo launchctl unload -w /Library/LaunchDaemons/cx.pow.firewall.plist
---
To undo the above:
sudo launchctl load /Library/LaunchDaemons/cx.pow.firewall.plist
@cliftonlabrum
cliftonlabrum / gist:4256540
Created December 11, 2012 07:19
Sync Files and Folders to Dropbox from Other Places on your Hard Drive
Use the ln command, for example:
ln -s /path/to/desired-folder ~/Dropbox/desired-folder
This works with files too:
ln -s /path/to/desired-file ~/Dropbox/desired-file
@cliftonlabrum
cliftonlabrum / gist:4575763
Created January 19, 2013 23:11
How to find a file in Terminal on Ubuntu.
sudo find / -name mySearchTerm
@cliftonlabrum
cliftonlabrum / gist:4589476
Created January 21, 2013 21:15
Change the Host Name on an Ubuntu server (Digital Ocean)
1. Rename the host in the web panel
2. Edit /etc/hostname
3. Edit /etc/hosts
4. Reboot