Skip to content

Instantly share code, notes, and snippets.

Bradford Cottel likethesky

Block or report user

Report or block likethesky

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@likethesky
likethesky / gist:3342081
Created Aug 13, 2012
Determining retina display manufacturer on rMBP
View gist:3342081
ioreg -lw0 | grep \"EDID\" | sed "/[^<]*</s///" | xxd -p -r | strings -6
Ripley: http://bit.ly/OGiSO8 (want manufacturer: 'SEC') also: http://bit.ly/Qea0kF
# If it outputs: LPxxx... then you have an LG, if: LSNxx... then you have a Samsung
# See: [DigiLloyd Burn-in follow-up](http://macperformanceguide.com/blog/2012/20120804_1-MacBookPro-Retina-screen-burn-in-followup.html) -and- [DigiLloyd MBPr Screen Burn-in] (http://macperformanceguide.com/blog/2012/20120703_2-MacBookPro-Retina-screen-burn-in.html)
# And (Apple Support thread): https://discussions.apple.com/thread/4034848?start=0&tstart=0
# Serial # links (to determine week of manufacture): http://www.macrumors.com/2010/04/16/apple-tweaks-serial-number-format-with-new-macbook-pro/ -and- http://www.chipmunk.nl/klantenservice/applemodel.html
@likethesky
likethesky / gist:3559639
Created Aug 31, 2012
Rebuild MBR partition on USB key
View gist:3559639
@likethesky
likethesky / gist:3559671
Last active Oct 9, 2015
find: Usage of Unix find command
View gist:3559671
find . -name '*lookingfor*' -print
-or-
find /path/you/want/to/start/in -name '*.rb' -print
-or-
# On OS X (searched indexed spotlight files, both user & system):
@likethesky
likethesky / gist:3559687
Created Aug 31, 2012
Extract a single file from .tar -- give it a name interactively
View gist:3559687
cpio -i -r *strict.lua < lua-5.1.4.tar.gz
@likethesky
likethesky / gist:3559735
Created Aug 31, 2012
Fix Ubuntu from command-line / recovery mode
View gist:3559735

So choose Recovery Mode, then login/exit to the command line, then:

mount -n -o remount,rw /

Above makes your hard drive read/write, which you'll need, in order to do the next step

sudo nano /etc/X11/xorg.conf

Use nano to edit your xorg.conf to fix it, ideally.

@likethesky
likethesky / gist:3829964
Created Oct 3, 2012
Setup fresh Sublime Text 2 on Ubuntu / Linux
View gist:3829964

Ubuntu / Linux install of Sublime Text

This will install and setup sublime (in /opt) and make it available via the 's' link (kept in /usr/local/bin)

Just type s on command line to open Sublime Text from then on!

First, (from a browser in your target Linux OS) go here: http://sublimetext.com (<-- click this link) and THEN right-click the <Download for Linux> button, and choose: Copy Link Location ... so you have the latest/greatest for your Linux OS.

Now in a terminal (ctrl-alt T, in Ubuntu), execute the following:

cd /opt

@likethesky
likethesky / gist:3836758
Created Oct 4, 2012
NetBeans 7.2 sample JavaFX app directory
View gist:3836758
brad@brad-macmini-ubuntu12-x64:~/NetBeansProjects/JavaFXApplication1$ ls -lAHtrR
.:
total 24
drwxrwxr-x 4 brad brad 4096 Oct 4 09:15 nbproject
drwxrwxr-x 3 brad brad 4096 Oct 4 09:15 src
-rw-rw-r-- 1 brad brad 82 Oct 4 09:15 manifest.mf
-rw-rw-r-- 1 brad brad 3474 Oct 4 09:17 build.xml
drwxrwxr-x 5 brad brad 4096 Oct 4 11:58 build
drwxrwxr-x 4 brad brad 4096 Oct 4 11:58 dist
@likethesky
likethesky / gist:3842609
Created Oct 5, 2012
Shutdown Ubuntu via terminal command
View gist:3842609

sudo shutdown -P now # completely shuts down and powers off machine (if hardware supports power off signal)

sudo shutdown now # shuts down, doesn't power off -- see http://askubuntu.com/a/73698/79523 for more details.

@likethesky
likethesky / index.html.haml
Created Nov 5, 2012
Cantango Demo -- goes in public/index.html of cantango_demo
View index.html.haml
%h1 Welcome to the CanTango Demo
%td= link_to("Home", root_path)
%td= link_to("Sign in", new_user_session_path)
%td= link_to("Sign up", new_user_registration_path)
%td= link_to("Sign out", destroy_user_session_path, :method => :delete)
%td= link_to("User forgot password", new_user_password_path)
%br
%br
%td= link_to("Admin home", admin_dashboard_path)
@likethesky
likethesky / gist:4262178
Created Dec 11, 2012
addressable gem dependency not bundled
View gist:4262178
My bundle aliases:
b = bundle
be = b exec
bi = b install --path vendor
bu = b update
bil = bi --local
binit = bi && b package --all && echo "vendor/ruby" >> .gitignore
# Note: my comments are in [#square brackets like this]
You can’t perform that action at this time.