(Several of these git examples have been extracted from the book 'Pragmatic guide to GIT' of Travis Swicegood )
git config --global user.name "Fernando Guillen"
git config --global user.email "fguillen.mail+spam@gmail.com"
cd /develop/myrepo
These are some snips to help you converting video to flash and thumbnails using ruby and paperclip. | |
Needed: ffmpeg & flvtool, RVideo gem, paperclip | |
Converting the video is done using outside of paperclip, as this could take quite a while. Paperclip by default does it's conversions during the request, and the last thing you want is a request hanging for 10minutes while ffmpeg does it's thing. It is advised to do this conversion somewhere in the background using Resque or DelayedJob. (make sure not to run to many conversions at one time on your machine) | |
Most video thumbnailing solutions out there will create all thumbnails from the video. This solution (on paperclip 2.3.0) however will create one large "temp_thumbnail" once and all consequent thumbnails can use this temporary version. | |
VideoGeometry will make sure that the target dimensions for ffmpeg are always a multiple of 2 and as close as possible to the desired dimensions without breaking the aspect ratio of the original video. |
if Rails.env.production? | |
module OmniAuth | |
module Strategy | |
def full_host | |
uri = URI.parse(request.url) | |
uri.path = '' | |
uri.query = nil | |
uri.port = (uri.scheme == 'https' ? 443 : 80) | |
uri.to_s | |
end |
alias :pputs :puts | |
def puts(str = "") | |
pputs(str) | |
$out << "#{str}" | |
end | |
STDOUT.instance_eval do | |
alias :pputs :puts | |
def puts(str = "") | |
pputs(str) |
// Ok, document.ready is jQuery - but you get the gist | |
$(document).ready(function() { | |
setTimeout(function() { | |
location.href = location.href; | |
}, 10000); | |
// 10000 == 10 seconds | |
// Change this if you want a different refresh period | |
}); |
# Install Homebrew | |
# | |
mkdir -p /usr/local | |
mkdir -p /usr/local/bin | |
sudo chown -R $USER /usr/local | |
cd $HOME && mkdir -p homebrew | |
curl -L https://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C homebrew | |
ln -nfs $HOME/homebrew/bin/brew /usr/local/bin/ | |
brew update |
I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.
I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real
source :rubygems | |
gem 'bench_press' | |
gem 'multi_json' | |
gem 'json' | |
gem 'yajl-ruby' | |
gem 'msgpack' | |
gem 'ruby-protocol-buffers' | |
gem 'bson' | |
gem 'bson_ext' |
#resource: http://www.coreseek.cn/products-install/install_on_bsd_linux/ | |
#requirements: | |
# m4 >= 1.4.13 | |
# autoconf >= 2.65 | |
# automake >= 1.11 | |
# libtool >= 2.2.6b | |
wget http://www.coreseek.cn/uploads/csft/4.0/coreseek-4.1-beta.tar.gz | |
tar xzvf coreseek-4.1-beta.tar.gz |