git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
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
(defun restclient-http-send-current-and-stay-in-current-buffer () | |
"Standard RESTClient C-c C-c but stays in current buffer" | |
(interactive) | |
(restclient-http-send-current) | |
(other-window -1) | |
) |
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
-include_lib("eunit/include/eunit.hrl"). | |
-module(simple_server). | |
-export([start/0]). | |
basic_test_() -> | |
{"Test quit message", | |
fun() -> | |
simple_server:start(), | |
?assertEqual("Quit command received. Closing down server", simple_server ! "quit") | |
end |
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
| top margin | | |
| [label] | | |
| [label2] [label3] | | |
| [button] | | |
| bottom margin | |
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
WallInfo = Struct.new(:api_key, :params) | |
wall = ["apikey", {page_id: 4, token: "token", server: "factory"}] | |
info = WallInfo.new(*wall) | |
info.api_key = "api_key" | |
info.params = {page_id: 4, token: "token", server: "factory"} | |
much better than info.first or info[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
class Time | |
def self.parse(string) | |
date_formatter = NSDateFormatter.alloc.init | |
date_formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss'Z'" | |
date_formatter.dateFromString string | |
end | |
def self.ago_in_words(seconds) | |
return "" unless seconds | |
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
λ ruby notifier.rb | |
DEPRECATION WARNING: Yajl::HttpStream is going to be removed in 2.0 | |
- Listening room 543389 | |
- Listening room 543383 | |
D, [2012-12-19T15:31:03.438930 #12265] DEBUG -- : Terminating 6 actors... | |
{"room_id"=>543389, "created_at"=>"2012/12/19 14:30:00 +0000", "body"=>nil, "starred"=>false, "id"=>763740860, "user_id"=>nil, "type"=>"TimestampMessage"} | |
{"room_id"=>543389, "created_at"=>"2012/12/19 14:31:38 +0000", "body"=>"j'ai une piste Étienne Barrié", "starred"=>false, "id"=>763740861, "user_id"=>1320888, "type"=>"TextMessage"} | |
{"room_id"=>543389, "created_at"=>"2012/12/19 14:32:03 +0000", "body"=>"pour l'upload", "starred"=>false, "id"=>763741181, "user_id"=>1320888, "type"=>"TextMessage"} | |
{"room_id"=>543389, "created_at"=>"2012/12/19 14:32:10 +0000", "body"=>"yes", "starred"=>false, "id"=>763741282, "user_id"=>1320885, "type"=>"TextMessage"} | |
{"room_id"=>543389, "created_at"=>"2012/12/19 14:32:17 +0000", "body"=>"faudrait bootstraper ça ou changer de plugin", "starred"=>false, "id"=>763741371, "u |
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
require "uri" | |
require "yajl/http_stream" | |
require "terminal-notifier" | |
require "celluloid" | |
class Stream | |
include Celluloid | |
def initialize(room, token) | |
@room = room |
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
require "uri" | |
require "yajl/http_stream" | |
require "terminal-notifier" | |
token = TOKEN | |
room_id = ID | |
url = URI.parse("http://#{token}:x@streaming.campfirenow.com/room/#{room_id}/live.json") | |
regexp = Regexp.new('julien', true) |
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
rustc: x86_64-apple-darwin/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd | |
error: linking with `clang` failed: exit code: 1 | |
note: "clang" "-Wl,--as-needed" "-m64" "-L" "/Users/julien/Code/rust/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "x86_64-apple-darwin/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/std-a5fc0d6c.0.o" "-o" "x86_64-apple-darwin/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-a5fc0d6c.so" "x86_64-apple-darwin/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/std-a5fc0d6c.metadata.o" "-Wl,-O1" "-nodefaultlibs" "-Wl,--whole-archive" "/var/folders/ch/w6vlkkr912n00b_t8q6dkgl00000gn/T/rustc.UYg7RveANPbS/libcollections-a5fc0d6c.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/var/folders/ch/w6vlkkr912n00b_t8q6dkgl00000gn/T/rustc.UYg7RveANPbS/liballoc-a5fc0d6c.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/var/folders/ch/w6vlkkr912n00b_t8q6dkgl00000gn/T/rustc.UYg7RveANPbS/librustc_unicode-a5fc0d6c.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archiv |