Skip to content

Instantly share code, notes, and snippets.

View sebastienfr's full-sized avatar
🚴‍♂️

Sébastien FRIESS sebastienfr

🚴‍♂️
View GitHub Profile
@sjtipton
sjtipton / redis-6380.conf
Created September 17, 2012 14:39
Sample redis configuration
# Redis configuration file example
# Note on units: when memory size is needed, it is possible to specifiy
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes
@vadviktor
vadviktor / move.py
Created August 30, 2012 14:28
Python: move files to creation date named directories
#!/usr/bin/python3
import os, time, shutil, sys
dir = sys.argv[1]
os.chdir(dir)
for f in os.listdir('.'):
ftime = time.gmtime(os.path.getmtime(f))
ctime_dir = str(ftime.tm_year) '-' str(ftime.tm_mon) '-' str(ftime.tm_mday)
if not os.path.isdir(ctime_dir):
os.mkdir(ctime_dir)
@MoriTanosuke
MoriTanosuke / CsvBean.java
Created June 23, 2011 18:58
Unmarshal CSV with Apache Camel and Bindy
package de.kopis.camel.model;
import org.apache.camel.dataformat.bindy.annotation.CsvRecord;
import org.apache.camel.dataformat.bindy.annotation.DataField;
@CsvRecord(separator = ",")
public class CsvBean {
@DataField(pos = 1)
private String first;
@DataField(pos = 2)