Skip to content

Instantly share code, notes, and snippets.

View optikfluffel's full-sized avatar
🤔
mmh..

Udo optikfluffel

🤔
mmh..
View GitHub Profile
@loranger
loranger / userscript.js
Created September 27, 2011 10:43
Trello badge userscript for FluidApp
// ==UserScript==
// @name Fluid Dock Badge for Trello
// @namespace http://fluidapp.com
// @description Display a dock badge for the Trello Dashboard with the number of new notifications
// @include *.trello.com
// @author Laurent Goussard
// ==/UserScript==
if (!window.fluid) {
return;
}
@twosixcode
twosixcode / gist:1988097
Created March 6, 2012 18:40
Make "Paste and Indent" the default paste in Sublime Text 2
// swap the keybindings for paste and paste_and_indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }
@frankrousseau
frankrousseau / gist:3500433
Created August 28, 2012 16:49
Cron job with Kue
Job = kue.Job
jobs = kue.createQueue()
# Set up server if you want to see your task progression with a beautiful UI
kue.app.listen 3003
# Your cron timing
delay = 3000
@niravmehta
niravmehta / kue_cleanup.js
Created July 30, 2013 11:57
Cleanup script for Kue job queueing system in Node.js. Deletes failed, active and completed jobs after specified time. Can run on command line directly with "node kue_cleanup". Requires Kue installed :-)
var kue = require('kue'),
jobs = kue.createQueue(),
util = require('util'),
noop = function() {};
jobs.CLEANUP_MAX_FAILED_TIME = 30 * 24 * 60 * 60 * 1000; // 30 days
jobs.CLEANUP_MAX_ACTIVE_TIME = 1 * 24 * 60 * 60 * 1000; // 1 day
jobs.CLEANUP_MAX_COMPLETE_TIME = 5 * 24 * 60 * 60 * 1000; // 5 days
jobs.CLEANUP_INTERVAL = 5 * 60 * 1000; // 5 minutes
#!/bin/bash
sshfs remoteserver:backup/secure /root/backup/sshfsMount -o ServerAliveInterval=15 -o uid=10025 -o gid=10003
encfs -i n -o allow_other /root/backup/sshfsMount /root/backup/encripted/
rdiff-backup --no-hard-links --terminal-verbosity 5 /mnt/raid/secure /root/backup/encripted
fusermount -u /root/backup/encripted
fusermount -u /root/backup/sshfsMount
@fdelbos
fdelbos / FreeBSD_node_monit.md
Last active February 17, 2020 13:38
FreeBSD 10 Nodejs setup with nginx, mongo and monit

FreeBSD 10 Nodejs setup with nginx, mongodb, redis and monit

This my receipe for installing a complete nodejs server on FreeBSD 10. The parameters used in this configuration are for a very small private server that I use for demo purpose only, so for a production server, you should somehow set the limits in pair with your ressources.

I use monit so I don't have to write rc scripts for node and it should take care of process lifecycle management for me. Alternatives exists such as supervisord or circus.

Installing mongodb

@fliiiix
fliiiix / ZFS #FTW
Last active August 29, 2015 14:03
Create FreeBSD tank which can deal with windows filenames
zpool create -O utf8only=on -O normalization=formD -O casesensitivity=mixed -O aclinherit=passthrough tank raidz ada0 ada1 ada2
#receive side
#sudo zfs allow -u l33tname create,receive,rename,mount,share,send tank
sudo zfs allow -l l33tname create,destroy,snapshot,rollback,clone,promote,rename,mount,send,receive,quota,reservation tank
l33tname@travos:~ % zfs allow tank
---- Permissions on tank ---------------------------------------------
Local permissions:
@addyosmani
addyosmani / README.md
Last active November 24, 2025 17:23 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

module PouchDB where
import Task exposing (Task)
import Native.PouchDB
type PouchDB = POUCHDB_IMPLEMENTED_IN_JAVASCRIPT
type PouchError
= Error
@jeanfbrito
jeanfbrito / influxdb.lua
Created January 6, 2016 18:41
NodeMCU and InfluxDB
-- Your access point's SSID and password
local SSID = "greenhouse"
local SSID_PASSWORD = "senhasupersecreta"
local DEVICE = "device001"
local temperature = 27.5
-- configure ESP as a station
wifi.setmode(wifi.STATION)
wifi.sta.config(SSID,SSID_PASSWORD)
wifi.sta.autoconnect(1)