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
# -l for the lexer you want to use (pygments has a lot of lexers) | |
# -f rtf to make it usable in your keynote | |
pygmentize -l go -f rtf sample.go | pbcopy |
Points of Discussion:
godoc
command.- Public/Private functions.
I hereby claim:
- I am keiththomps on github.
- I am keiththomps (https://keybase.io/keiththomps) on keybase.
- I have a public key whose fingerprint is AAA0 59DA E081 4E4C 8AC1 81D1 19EA EBCB B704 393F
To claim this, I am signing this object:
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
javascript:$('.first-name').val("Test"); | |
$('.middle-initial').val("T"); | |
$('.last-name').val("Testerson"); | |
$.each( $("#traveler-details").children("table").children("tbody").children("tr"), function(index, value) { var $ageHtml, $dobHtml, year, age, ageString; | |
year = new Date().getFullYear(); | |
$ageHtml = $(value).find(".age label"); | |
$dob = $(value).find("input.dob"); | |
age = year - $ageHtml.text(); | |
ageString = "1/1/" + age; | |
$dob.val(ageString); |
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
sheet = ScssFile.new("sample.scss") | |
sheet.styles_for_class(".orange_header") | |
=> "color: #FF8E00; font-family: Arial, sans-serif; font-size: 24px;" | |
sheet.styles_for_class(".box_border_left") | |
=> "font-family: Arial, sans-serif; font-size: 16px; border-left: 1px solid #dddddd; padding: 10px;" |
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
# How class methods work in ruby | |
class MyClass | |
def self.stuff | |
puts "This is stuff on #{self}" | |
end | |
end | |
MyClass.stuff # => "This is stuff on MyClass" |
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 zsh -i | |
echo "Files containing unnecessarily named functions:" $(ag "\w+\s*:\s*function\s*\w+\s*\(" app/assets/javascripts -l | wc -l) | |
echo "Files containing bad spaces in function expressions:" $(ag "(function \(|function(\s\w+)?\(.*\){)" app/assets/javascripts -l | wc -l) | |
echo "Files containing { on new line:" $(ag "^\s*\{\s*$" app/assets/javascripts -l | wc -l) |
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
# Remove vagrant VM | |
thed && vagrant halt && vagrant destroy | |
# Update repos | |
sqm repos update | |
# Install, create boot2docker VM, set up direnv for docker values. | |
workstation && script/bootstrap | |
echo "Now you need to update your rails apps, and set database 'host' to match what's in the example file" |
OlderNewer