Skip to content

Instantly share code, notes, and snippets.

@bobuss
bobuss / README.md
Created June 21, 2012 11:05
Horizontal scroll in the background

Scrollable.js

Just add a "scrollable" class name to your background element, then it will scroll from left to right, according to your scroll event.

@bobuss
bobuss / index.html
Created June 20, 2012 10:34
CSS3 Sign
<!DOCTYPE html>
<html>
<head>
<title>CSS3 Sign</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="container">
@bobuss
bobuss / index.html
Created March 6, 2012 10:59
d3 great arcs over polymaps
<!DOCTYPE html>
<html>
<head>
<title>D3 over Polymap example</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="map.css" />
</head>
<body onload="init();">
<div id="map_container"></div>
@bobuss
bobuss / logrotate.cron
Last active August 29, 2015 14:22
logrotate template
#!/bin/sh
# Delete log files older than {{ daysdelete }} days
nice -n 19 find {{ logdirectory }} -type f -name "*.bz2" -mtime +{{ daysdelete }} -exec rm '{}' \; >/dev/null 2>&1
# Compress log files older than {{ dayscompress }} days
ionice -c3 nice -n 19 find {{ logdirectory }} -type f ! -path "*.bz2" ! -path "*.log" ! -path "*.gz" -mtime +{{ dayscompress }} -exec bzip2 '{}' \; >/dev/null 2>&1
# Reload rsyslog
/bin/kill -HUP $(cat /var/run/rsyslogd.pid)
@bobuss
bobuss / gist:988aaca32f5fbe6e73a9
Last active August 29, 2015 14:19
Raspberry recipies

Install a raspbian image on a sd-card, under Max OSX

Fast and clean !

$ df -h
Filesystem                                          Size   Used  Avail Capacity   iused     ifree %iused  Mounted on
/dev/disk1                                         465Gi  188Gi  276Gi    41%  49449884  72346210   41%   /
...
/dev/disk2s1 56Mi 14Mi 42Mi 26% 512 0 100% /Volumes/boot
@bobuss
bobuss / index.html
Last active August 29, 2015 14:16
index.html start file
<!DOCTYPE html>
<!-- Based on HTML5 Bones | http://html5bones.com -->
<html lang="en">
<head>
<meta charset="utf-8">
<title>Page Title</title>
<meta name="description" content="">
@bobuss
bobuss / change_git_author
Created November 6, 2014 08:01
Change the git commits author
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
01:38,39,69,71,73,74
02:08,51,59,60,77,80
03:18,23,42,58,63,71
04:05,06,26,83,84
05:04,26,38,73
06:04,83
07:26,30,38,42,43,48,84
08:02,51,55
09:11,31,66
10:21,51,52,77,89
@bobuss
bobuss / logging.py
Created March 5, 2014 12:19
Send locals to your sentry server while an exception occurs
from __future__ import absolute_import
import pprint
from raven.handlers.logging import SentryHandler
class VerboseSentryHandler(SentryHandler, object):
"""
Subclass the SentryHandler in order to add the locals to the record
Inspired by The Verbose exception Formatter
From Bitly blog : http://word.bitly.com/post/69080588278/logging-locals