Skip to content

Instantly share code, notes, and snippets.

View enko's full-sized avatar
🐉
🧙

Tim enko

🐉
🧙
View GitHub Profile
@enko
enko / Dockerfile
Last active November 29, 2017 02:34
docker and colors reproduction
FROM node:6.6
# add node modules folder to path and set global node path
ENV NODE_PATH /opt/node_modules
ENV PATH /opt/node_modules/.bin:$PATH
# copy dependency file for npm into the container --> everytime (to update possible dependencies)
ADD package.json /opt/package.json
# rm old node_modules
#
# A systemd service definition for partuniverse
#
[Unit]
Description=partuniverse service definition
Requires=nginx.service partuniverse.socket
Before=nginx.service
After=network.target
[Service]
@enko
enko / default.nix
Created June 1, 2016 20:45
nix package for apt-dater
{ stdenv, automake114x, autoconf, vim, glib, clang, libxml2, fetchurl, openssl, ncurses, pkgconfig, popt, screen }:
stdenv.mkDerivation rec {
name = "apt-dater-${version}";
version = "1.0.2";
src = fetchurl {
url = "https://github.com/DE-IBH/apt-dater/archive/v${version}.tar.gz";
sha256 = "4d01e734f4dac32ff2eb279e6493a1019f2c2fce0e35cea48df027a593df0355";
};
{ stdenv, automake, autoconf, vim, glib, clang, libxml2, fetchurl, openssl, ncurses, pkgconfig, popt }:
stdenv.mkDerivation rec {
name = "apt-dater-${version}";
version = "1.0.2";
src = fetchurl {
url = "https://github.com/DE-IBH/apt-dater/archive/v${version}.tar.gz";
sha256 = "4d01e734f4dac32ff2eb279e6493a1019f2c2fce0e35cea48df027a593df0355";
};
@enko
enko / default.nix
Created January 24, 2016 14:10
nix-shell environment for [riddim](http://code.zash.se/riddim/)
with import <nixpkgs> {}; {
luaEnv = stdenv.mkDerivation {
name = "lua";
buildInputs = [ stdenv lua51Packages.luasocket lua51Packages.luaexpat lua51Packages.luasec ];
LUA_PATH="${lua51Packages.luasec}/lib/lua/5.1/?.lua;${lua51Packages.luaexpat}/share/lua/5.1/?.lua;${lua51Packages.luasocket}/share/lua/5.\
1/?.lua;./?.lua";
LUA_CPATH="${lua51Packages.luasec}/lib/lua/5.1/?.so;${lua51Packages.luaexpat}/lib/lua/5.1/?.so;${lua51Packages.luasocket}/lib/lua/5.1/?.s\
o;./?.so;/usr/lib/lua/5.1/?.so;/usr/lib/lua/5.1/loadall.so";
};
}
-- Prosody Example Configuration File
--
-- Information on configuring Prosody can be found on our
-- website at http://prosody.im/doc/configure
--
-- Tip: You can check that the syntax of this file is correct
-- when you have finished by running: prosodyctl check config
-- If there are any errors, it will let you know what and where
-- they are, otherwise it will keep quiet.
--
<?php
class SpecialForm {
private $function = null;
private $callback = null;
public function __construct($function,$callback) {
$this->function = $function;
$this->callback = $callback;
}
@enko
enko / check_rrsig.py
Created September 6, 2015 17:10
A script to check to the lifetime of a rrsig
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import subprocess
import re
import datetime
def main():
if (len(sys.argv) != 2):
<?php
$int = new DateInterval('P27DT19H26M39S');
$now = new DateTime();
var_dump($now);
$now->add($int);
var_dump($now);
@enko
enko / timelapse.py
Last active August 29, 2015 14:23
A simple webcam timelaspe script. Windows only since [VideoCapture](http://videocapture.sourceforge.net/) runs only on windows.
# -*- coding: utf-8 -*-
import VideoCapture
import datetime
import time
device = VideoCapture.Device()
device.setResolution(1920,1080)
while True:
now = datetime.datetime.now()