This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'pstore' | |
@data = PStore.new("contacts.pstore") | |
@data.transaction do | |
@data["contacts"] ||= [] | |
@data.commit | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In three days time, on Saturday 17th of May, the best tech party of the year will be taking place in London. It's called Digital Sizzle, Beards in Wonderland, and it's going to be amazing. | |
http://thedigitalsizzle.com | |
When I heard about it, I bought two tickets stright away. | |
Unfortunately however, I'll be out of the country. Instead of selling the tickets, I'd like to give them away to one of the lovely people in London's tech scene. For a chance to win one of these tickets, all you need to do is share the following Facebook post, or retweet the following tweet. | |
Share this: | |
https://www.facebook.com/andrewcmcdonough/posts/10152071602295079 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gunzip -c production.log.1.gz |awk '/MyController#create/ {freq[substr($7,0,5)]++} END {for (time in freq) printf "%d\t%s\n", freq[time], time }' | sort -nr | head -n 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tail -f log/development.log | |
logger.debug("\e[H\e[2JThis log message will appear on a cleared screen") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add these two lines to your .vimrc to get shortcuts h1 and h2 to create markdown headers with a nice length. | |
# Works by coping and pasting the current line, then substituting any character with a = (for h1) or - (for h2) | |
:map h1 yyp:s/./=/g<ENTER> | |
:map h2 yyp:s/./-/g<ENTER> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sys Admin and Application Development for sportcentric | |
====================================================== | |
sportcentric is the market-leader in the provision of websites and online applications and databases to the international sports industry. | |
The company has its headquarters in Notting Hill, London and an office in Lausanne, and its client base includes Olympic, international | |
and national associations and governing bodies, professional sports franchises, and sports businesses. | |
sportcentric is looking for a new Technical Support person. We are looking for a technical person who enjoys client interaction. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<...existing universal settings...> | |
case `uname` in | |
'Darwin') | |
# Mac specific settings | |
<...put Mac specific settings in here...> | |
# End Mac specific settings | |
;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Front-end developer | |
=================== | |
Tribesports are in the process of building tribesports.com, a next generation | |
sports social network where people can share, celebrate and improve their | |
sporting performance. We are just about to enter our second phase of | |
development, and we are looking for a talented front-end web developer to join | |
the team. Our platform is built in Ruby on Rails, and although ruby experience | |
is highly desirable, we will consider candidates with strong front-end | |
development skills and experience in other languages, who are keen to work with | |
ruby. A passion for standards-compliant, semantic HTML and CSS is absolutely |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Firstly, I was having problems accessing port 3000 on localhost, so I switched to pow, | |
so I could access http://spotview.dev (http://pow.cx/) | |
Secondly, the manifest.json file is only reloaded when you close and reopen the app, | |
so when you add your http://myapp.dev to the RequiredPermissions array, make sure you | |
close and reopen. | |
Finally, you need to set a response header of Access-Control-Allow-Origin: *. I did this | |
in rails with a filter in the controller, but you could do this more cleanly with rack | |
or a custom responder. My (slightly dirty) solution: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ echo "export PATH=.bundle/bin:$PATH" >> .rvmrc | |
$ bundle install --binstubs=.bundle/bin | |
$ cd .. | |
$ cd <app-dir> | |
installs binstubs into app_dir/bin, and rvm adds ./bin to your path automatically (and takes it away again when you cd out of the app dir) | |
no more bundle exec |
OlderNewer