Skip to content

Instantly share code, notes, and snippets.

View fdevibe's full-sized avatar

Fredrik de Vibe fdevibe

View GitHub Profile
@fdevibe
fdevibe / i3-urgent-notify.py
Created October 20, 2016 11:58
Send desktop notifications on window urgency hints on i3
#! /usr/bin/env python
import i3ipc
import pgi
pgi.require_version('Notify', '0.7')
from pgi.repository import Notify
i3conn = i3ipc.Connection()
Notify.init('Urgent!')
@fdevibe
fdevibe / Users-seed-example.js
Last active November 13, 2021 15:24
Dumb, straightforward seeding Sequelize data. Feel free to improve. :-)
var _ = require('lodash'),
fs = require('fs'),
path = require('path'),
csv = require('csv'),
Sequelize = require('sequelize');
function addUser(db, filename, rolesByName, addresses) {
var parser = csv.parse({}, function (err, data) {
db.models.User.bulkCreate(
_.map(data, function (record, index) {