Version: 1.9.8
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
sudo apt-get update | |
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev | |
cd | |
git clone git://github.com/sstephenson/rbenv.git .rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
exec $SHELL | |
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build |
If you import live data into Google Docs spreadsheets using the importdata function and you want to force a refresh at a certain interval, but you also want to ensure that some cache-busting goes on, append a querystring that's the epoch time value that the refresh occurs, so for a sheet that should grab new data every hour you could force an update like this:
importData("http://example.com/data.csv?" & hour(googleclock()) & ")")
But the url requested looks like this: http://example.com/data.csv?11
if the refresh happened at 11am. The next day at 11, the url will be the same, so there's a chance you may get cached data. To get around this, use an epoch time-based refresh. The formula:
=((date(year(googleclock()),month(googleclock()),day(googleclock())) & " " & time(hour(googleclock()), 0, 0)) - DATE( 1970;1;1))*86400
gives you the epoch timestamp for the time at the current hour. If you wanted the timest
// Meetup is a micro proxy program that enables to connect two endpoints via TCP sockets. | |
// Either of endpoint may listen or connect. | |
// | |
// Example usage: | |
// - you have a faulty PHP application and you want to debug it with xdebug | |
// - xdebug can connect to your machine:9000, but you are behind NAT | |
// - so you run `meetup -listen1=:9000 -listen2=:9001` on the application server | |
// - and another `meetup -connect1=appserver:9001 -connect=localhost:9000` on your machine | |
// First instance listens two ports and when a connection arrives on both, it creates | |
// a bidirectional buffered pipe between the two. The other instance connects to |
require './hash_inverse' | |
describe Hash do | |
describe "when empty and asked for the inverse" do | |
it "returns an empty hash" do | |
{}.inverse.must_equal Hash.new | |
end | |
end | |
describe "when mapping are unique and asked for the inverse" do |
Copyright (C) 2011 by Colin MacKenzie IV | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in |
In a small project I'm currently developing, we have this assets.fla
file which was previously hosted under our Git repository. Due to bizarre problems with Git's merge tool and .fla file type (we were losing library symbols, for some reason), we decided to move assets.fla
from our Git repository to the project's folder on Dropbox.
That was a smart move, problems with merge were gone and others could know everytime a update is made. But with the time (one day of working, lol) it was getting kind of annoying. Everytime I wanted to update some asset (generate the .swc file), I needed to edit the export path. There are three of us working on this file, and everybody needed to repeat the same thing every time a change was needed.
So, since I have a problem, where can be the solution? bash
for sure!
Then I wrote a script to automatize this process and it now fits quite well on the project workflow.
//To fetch a branch, you simply need to: | |
git fetch origin | |
//This will fetch all of the remote branches for you. With the remote branches | |
//in hand, you now need to check out the branch you are interested in, giving | |
//you a local working copy: | |
git checkout -b test origin/test |
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |