This file contains hidden or 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
bit $ ./bit ls | |
./bit: no issues yet. | |
bit $ ./bit open | |
>> This is my first issue | |
[some editing in your favorite editor] | |
./bit: created issue 1. | |
bit $ ./bit open | |
[some editing again] | |
>> Another one | |
./bit: created issue 2. |
This file contains hidden or 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
def to_filter(query) | |
query.split(/ +/).map { |chunk| | |
case chunk | |
when /^by:(.+)/ | |
{:author => $~[1]} | |
when /^is:(.+)/ | |
{:status => $~[1]} | |
else | |
:title.like("%#{chunk}%") | |
end |
This file contains hidden or 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 'fileutils' | |
# ShitStorm libs | |
require File.join(File.dirname(__FILE__), '..', 'lib', 'shitstorm') | |
include ShitStorm | |
# Swap to test DB | |
db_file = File.join(File.dirname(__FILE__), 'test.db')[2..-1] | |
migrations_dir = File.join(File.dirname(__FILE__), '..', 'migrations') |
This file contains hidden or 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 SplitLog < Sequel::Migration | |
def up | |
alter_table :comments do | |
add_foreign_key :entry_id, :entries | |
end | |
alter_table :entries do | |
drop_column :url | |
add_column :author, String | |
end |
This file contains hidden or 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 'time' | |
require 'pathname' | |
module Honk | |
extend self | |
attr_reader :posts, :tags | |
@posts = [] | |
@tags = {} |
This file contains hidden or 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
#!/usr/bin/env ruby | |
class Grapher | |
class << self | |
Props = { | |
:branch => '[shape=box,style=filled,fillcolor="#ccffcc",color="#003300"]', | |
:commit => '[style=filled,fillcolor="#ffffcc",color="#663333"]', | |
:ref => '', | |
:relation => '[dir=back,color="#545443"]', |
This file contains hidden or 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
~ $ df -h | |
Sys. de fich. Tail. Occ. Disp. %Occ. Monté sur | |
/dev/sda1 6,5G 6,0G 183M 98% / | |
[...] | |
# Looks like I'm running short of space :D | |
# Step 1: | |
~ $ sudo gem1.8 cleanup | |
[... lots of text ...] |
This file contains hidden or 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
create or replace function acte_possible | |
(code in varchar2, day in date, creneau_min in number) | |
return number | |
is | |
nb_actes number; | |
cursor services_ouverts is | |
select s.NumService | |
from Service s | |
left join EstOuvert eo on s.NumService = eo.NumService | |
left join EstCompetent ec on s.NumService = ec.NumService |
This file contains hidden or 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
void sgf_putc(OFILE* file, char c) { | |
assert (file->mode == WRITE_MODE); | |
if ((file->ptr != 0) && ((file->ptr % BLOCK_SIZE) == 0)) { | |
sgf_append_block (file); | |
} | |
file->buffer[ (file->ptr % BLOCK_SIZE) ] = c; | |
file->ptr++; | |
} |
This file contains hidden or 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
080495b0 <sgf_remove>: | |
80495b0: 55 push %ebp | |
80495b1: 89 e5 mov %esp,%ebp | |
80495b3: 81 ec 98 00 00 00 sub $0x98,%esp | |
80495b9: 8d 85 78 ff ff ff lea -0x88(%ebp),%eax | |
80495bf: 89 44 24 04 mov %eax,0x4(%esp) | |
80495c3: 8b 45 08 mov 0x8(%ebp),%eax | |
80495c6: 89 04 24 mov %eax,(%esp) | |
80495c9: e8 6e f4 ff ff call 8048a3c <read_block> | |
80495ce: c7 44 24 04 ff ff ff movl $0xffffffff,0x4(%esp) |