These are some of my personal picks from this year's FOSDEM. Complete video archive is here and the complete conference schedule is here.
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
// filter entries with empty 'field1' | |
r.db('db_name') | |
.table('test') | |
.filter(function(search){ return search.hasFields('field1').not() }) | |
.count(); | |
// return only rows that have 'field1' presesent | |
r.db('db_name') | |
.table('test') | |
.hasFields('field1') |
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
-- Copyright (C) Yichun Zhang (agentzh), CloudFlare Inc. | |
local sub = string.sub | |
local byte = string.byte | |
local tcp = ngx.socket.tcp | |
local concat = table.concat | |
local null = ngx.null | |
local pairs = pairs | |
local unpack = unpack |
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
import sys | |
import json | |
import logging | |
from flask import Flask | |
from flask import request | |
from flask import Response | |
# log handler | |
stdout_logh = logging.getLogger() |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.define :test1 do |box| | |
box.vm.hostname = 'test1' | |
box.vm.network :forwarded_port, :guest => 9190, :host => 9190 | |
box.vm.provider "docker" do |d| |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
diff -ur orig/ext/readline/readline.c fixed/ext/readline/readline.c | |
--- orig/ext/readline/readline.c 2014-03-18 13:53:31.866359527 +0100 | |
+++ fixed/ext/readline/readline.c 2014-03-18 13:56:26.390247250 +0100 | |
@@ -1883,7 +1883,7 @@ | |
rl_attempted_completion_function = readline_attempted_completion_function; | |
#if defined(HAVE_RL_PRE_INPUT_HOOK) | |
- rl_pre_input_hook = (Function *)readline_pre_input_hook; | |
+ rl_pre_input_hook = (rl_hook_func_t *)readline_pre_input_hook; | |
#endif |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
#!/bin/bash | |
prefix=$(hostname|tr '[:upper:]' '[:lower:]')-$USER | |
agents=( | |
"$prefix-agent1" | |
"$prefix-agent2" | |
"$prefix-agent3" | |
"$prefix-agent4" | |
) |
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
#!/bin/bash | |
# | |
# Examples: | |
# | |
# $ git issue 23358 | |
# $ git issue 23358 -p | |
issue_id=$1 | |
show_diff=$2 |