Skip to content

Instantly share code, notes, and snippets.

View KaraAJC's full-sized avatar
🦄
werk

Kara A Carrell KaraAJC

🦄
werk
View GitHub Profile
@jxson
jxson / README.md
Created February 10, 2012 00:18
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

@brutuscat
brutuscat / index.json.haml
Created February 14, 2012 09:59
Rails HAML Json render
:plain
[
- @movies.each do |movie|
:plain
{
"name":"#{movie.name}",
"description":"#{j(movie.description)}"
},
]
@caniszczyk
caniszczyk / clone-all-twitter-github-repos.sh
Created October 9, 2012 04:25
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'

Linux fun-o-matic

How to have some fun using the terminal.

  1. Install cowsay [0] via : sudo apt-get install cowsay
  2. Install fortune [1] via : sudo apt-get install fortune
  3. Make sure you have Ruby installed via : ruby -v
  4. Install the lolcat [2] via : gem gem install lolcat
  5. Profit!
@patshaughnessy
patshaughnessy / gist:7104128
Last active July 25, 2024 14:34
Resources for learning about MRI Ruby's internal C source code
Recently someone asked me for online resources about MRI's internal C source
code. Here are a few - if there are more to add please leave a comment! - pat
1. Ruby Hacking Guide - The definitive resource for people who want to learn
the C programming details of how Ruby works internally. Intended for C hackers.
It was just recently translated into English from the original Japanese.
http://ruby-hacking-guide.github.io
2. Various presentations by Koichi Sasada - he often does public presentations
on Ruby internals and they're always fascinating and full of technical details.
@brandonkelly
brandonkelly / templating.md
Last active February 7, 2024 15:20
Templating in EE vs. Craft
@dmccreary
dmccreary / arduino-draw-8x8-led.cpp
Last active September 5, 2018 07:02
Arduino program to draw pixels in an 8x8 LED matrix using multiplexing. This example draws "I", "Heart", "U".
/*
Display "I", "Heart", "U" on a 8 by 8 LED matrix
Dan McCreary, Feb. 14th, 2014
*/
// You can get an red LED matrix for under $5
// Here is a sample: http://www.amazon.com/Common-Anode-Diameter-Display-Matrix/dp/B00EZBZF5K/ref=pd_sim_sbs_e_1
// we are not using pins 0 and 1 and 13
// Connect pins 1-8 (bottom edge) and pins 9-16 (top edge) on the LED matrix
// to the Arduino digital outputpins 2-12 and Analog pins A0 to A3 as outputs
@adrianorsouza
adrianorsouza / sublime-command-line.md
Last active September 26, 2023 16:26
launch sublime text from the command line

Launch Sublime Text from the command line on OSX

Sublime Text includes a command line tool, subl, to work with files on the command line. This can be used to open files and projects in Sublime Text, as well working as an EDITOR for unix tools, such as git and subversion.

Requirements

  • Sublime text 2 or 3 installed in your system within Applications folder

Setup

@ryansobol
ryansobol / symbols.md
Last active August 6, 2024 14:51
Symbols in Ruby

What's a Symbol and why is it imporant?

In Ruby, a Symbol is the most efficient way, in terms of time and memory, to represent a set of characters.

What does a Symbol look like?

Most commonly, a Symbol is a single word prefixed by a colon:

:hello