This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {}}: | |
let | |
lib = pkgs.lib; | |
makeImageFromDebDist = | |
{ name, fullName, size ? 4096, urlPrefix | |
, packagesList ? "", packagesLists ? [packagesList] | |
, packages, extraPackages ? [], postInstall ? "" | |
, extraDebs ? [] | |
, QEMU_OPTS ? "", memSize ? 512 | |
, createRootFS }: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file describes how to build custom virtualbox instances. This examples ignores things like cross compiling etc.. | |
# this defines the function signature of our expression, pkgs is defaulted to the systems packages, | |
# you could also overrides that if you need a specific release / channel. | |
{ pkgs ? import <nixpkgs> {}}: | |
# "let" expressions are just there to introduce scoped variables and functions, | |
# in this case it is declaring just a helper function | |
let | |
# this creates a helper function that abstracts a bit of the boilerplate away | |
# `mkVM` takes one argument, a list of `modules` to include in the image. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Match] | |
Name=enp0s31f6 | |
[Network] | |
Address=192.168.0.1/24 | |
VRF=vrf-customer1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[NetDev] | |
Name=vrf-customer1 | |
Kind=vrf | |
[VRF] | |
TableId=42 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os.path | |
from ics import Calendar, Event | |
import subprocess | |
import json | |
def read_tasks(): | |
output = subprocess.check_output(['task', 'export']) | |
for task in json.loads(output.decode('utf-8')): | |
if task['status'] == 'completed': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Service] | |
ExecStartPre=-/usr/bin/docker rm psql-tmpfs | |
ExecStart=/usr/bin/docker run --rm --shm-size=2g --name psql-tmpfs -p 127.0.0.1:5434:5432 -t andir/postgresql-tmpfs | |
ExecStartPost=/bin/sleep 15 | |
ExecStop=/usr/bin/docker stop psql-tmpfs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright (c) 2011-2013 by w8rabbit (w8rabbit[at]mail[dot]i2p) | |
# or from outside i2p: w8rabbit[at]i2pmail[dot]org | |
# | |
# Script is under GPL3. | |
# | |
# Script is inspired by NullPointerException's xchat script | |
# | |
# thanks to darrob for hard beta-testing | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/dash | |
### | |
# ABOUT : collectd monitoring script for smartmontools (using smartctl) | |
# AUTHOR : Samuel B. <samuel_._behan_(at)_dob_._sk> (c) 2012 | |
# LICENSE: GNU GPL v3 | |
# SOURCE: http://devel.dob.sk/collectd-scripts/ | |
# | |
# This script monitors SMART pre-fail attributes of disk drives using smartmon tools. | |
# Generates output suitable for Exec plugin of collectd. | |
### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# python | |
Python 2.7.5 (default, Feb 19 2014, 13:47:28) | |
[GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> f = open('nvidia_drv.so', 'r+b') # version 330.4Xsomething... | |
>>> f.seek(0xb3e87) | |
>>> f.read(1) | |
'\x85' | |
>>> f.seek(0xb3e87) | |
>>> f.write('\x84') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
from flask.ext.sqlalchemy import SQLAlchemy | |
from flask.ext.restless.helpers import to_dict | |
from sqlalchemy.ext.hybrid import hybrid_property | |
import line_profiler | |
profile = line_profiler.LineProfiler() | |
profile.add_function(to_dict) | |
app = Flask(__name__) |