I stumble across a lot of interesting JavaScript resources (articles, tutorials, videos, etc.) day to day. Many I don't have time to read, at least not right away, so I am dumping them here. Some of these resources might suck, so bear with me.
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
puts '=====' | |
puts 'defining the Parent class with #poop' | |
class Parent | |
def poop | |
puts "💩 💩" | |
end | |
end | |
puts 'defining the Child < Parent class with #poop' |
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
# with postgres DDL | |
execute SQL<<- | |
create table users( | |
... | |
created_at timestamptz not null, | |
updated_at timestamptz not null | |
); | |
SQL | |
# with Rails DSL |
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
> {a: 1, b: 2, c: 3}.slice(:a) | |
=> {:a=>1} | |
> {a: 1, b: 2, c: 3}.slice!(:a) | |
=> {:b=>2, :c=>3} |
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
#!/bin/bash | |
# This script must be run from within the working copy of the repository | |
# Get the revision number for the HEAD of the repository | |
svn info -r HEAD | awk '/^Revision:/ {print $2}' |
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
#!/bin/bash | |
# This script is going to find all files below the current directory of the given type | |
ftype=$1 | |
find ./ | awk "/${ftype}$/ {print \$0}" | sed -e 's/\/\//\//' | |
exit 0 |
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
#!/bin/bash | |
# Given a filename and a revision number, find the revision number previous to this one. | |
fname=$1 | |
curr=$2 | |
prev="" | |
for revnum in `svn log -q $fname | awk '/^r/ {print $1}' | sed -e 's/r//' | sort -n` | |
do |
OlderNewer