Ubuntu 12.10 setup (rbenv/RVM, Janus, PostgreSQL)
- Some utilities:
sudo apt-get install vim tmux git curl- Copy/paste from the command line:
| A little test of sqlite3 thread safety across multiple processes. | |
| Ensure sqlite is built with: | |
| #define SQLITE_THREADSAFE 1 | |
| poll.c will create database and table if necessary and start polling for inserts. | |
| writer.c will insert the current time into the db once every second. | |
| TimerQueue code borrowed from: |
sudo apt-get install vim tmux git curl| class TicketsController < ApplicationController | |
| def show | |
| tickets = params[:tickets].split(",") | |
| ticket_data = tickets.map do |ticket| | |
| parallel { Faraday.get("http://tickets.local/#{ticket}") } | |
| end | |
| render json: { tickets: ticket_data.map(&:result) } | |
| end |
For a tmux status line as seen in the example image for the wemux project:
The session on the left in the example screen shot uses a patched font from the vim-powerline project. Inconsolata-dz, you beautiful creature.
To duplicate the left status line add the following lines to your ~/tmux.conf
set -g status-left-length 32
set -g status-right-length 150
| /* | |
| * C11 <threads.h> emulation library | |
| * | |
| * (C) Copyright yohhoy 2012. | |
| * Distributed under the Boost Software License, Version 1.0. | |
| * (See copy at http://www.boost.org/LICENSE_1_0.txt) | |
| */ | |
| #ifndef EMULATED_THREADS_H_INCLUDED_ | |
| #define EMULATED_THREADS_H_INCLUDED_ |
| // float->sRGB8 conversions - two variants. | |
| // by Fabian "ryg" Giesen | |
| // | |
| // I hereby place this code in the public domain. | |
| // | |
| // Both variants come with absolute error bounds and a reversibility and monotonicity | |
| // guarantee (see test driver code below). They should pass D3D10 conformance testing | |
| // (not that you can verify this, but still). They are verified against a clean reference | |
| // implementation provided below, and the test driver checks all floats exhaustively. | |
| // |
| #!/bin/sh | |
| # | |
| # IDE Session starter - you should save this script as ~/bin/session, make it | |
| # executable with chmod +x ~/bin/session, and then make a symlink to it for | |
| # every application you want to start. | |
| # E.g. ln -s session ~/bin/members creates a "members" symlink, and when you'll issue | |
| # "members" on the command line this script will: | |
| # Check if a tmux session named "members" exists |
Just install this in your apps like so:
gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'
| bool SHCopy(LPCTSTR from, LPCTSTR to) | |
| { | |
| Log(_T("Recursive file copy from %s to %s"), from, to); | |
| SHFILEOPSTRUCT fileOp = {0}; | |
| fileOp.wFunc = FO_COPY; | |
| TCHAR newFrom[MAX_PATH]; | |
| _tcscpy_s(newFrom, from); | |
| newFrom[_tcsclen(from) + 1] = NULL; | |
| fileOp.pFrom = newFrom; |
Here is the list of Ad-Block filters I use in order to get rid of all the new crap Google added to their search results pages.
www.google.com##DIV[id="vspb"]
www.google.com##DIV[class="vspi"]
www.google.com##BUTTON[class="vspib"]
www.google.com##BUTTON[class="esw eswd"]
www.google.com##BUTTON[class="esw eswd eswh"]
www.google.com##[class="esw eswd esws"]
www.google.com##DIV[id="nyc"]
www.google.com##DIV[class="vspib"]