Skip to content

Instantly share code, notes, and snippets.

View flavius's full-sized avatar

Flavius Aspra flavius

View GitHub Profile
function! ToggleFlagOptionValue(option, flag)
exe "set " . a:option . eval("&" . a:option . " =~# '" . a:flag . "' ? '-=" . a:flag . "' : '+=" . a:flag . "'")
endfunction
echo &go
call ToggleFlagOptionValue('go', 'T')
call ToggleFlagOptionValue('go', 'r')
echo &go
# for flag in ['T', 'r'] | call ToggleFlagOptionValue('go', flag) | endfor
@flavius
flavius / primul
Created February 15, 2012 16:55
Solutii_yet_another_project
tioiutou
#include <stdlib.h>
#include <stdio.h>
#include "stack.h"
void push(struct node** first, struct node** addAfter, const char val){
struct node* top;
top = malloc(sizeof(struct node*));
top->val = val;
@flavius
flavius / zerologger.py
Created July 10, 2011 18:53 — forked from gwik/zerologger.py
Python logger ZeroMQ, Gevent, CouchDB
# encoding: utf-8
"""
A python logging Handler that use ZeroMQ (ØMQ).
+------+ +------+ +-------+
| app1 | | app2 | | app X |
+------+ +------+ +-------+
| PUSH | PUSH | PUSH