Skip to content

Instantly share code, notes, and snippets.

View fabaff's full-sized avatar

Fabian Affolter fabaff

View GitHub Profile
@fabaff
fabaff / pxe-install
Created April 13, 2013 08:33
This simple script helps to setup a basic PXE Server in an existing environment on a Fedora-based system. It's a summary of this blog post [1]. Requirements: - root access - Fedora 18 (firewalld) - Access to the DHCP server configuration [1] http://fabian-affolter.ch/blog/index.php/installationsserver
# This simple script helps to setup a basic PXE Server in an existing
# environment on a Fedora-based system.
#
# Licensed under GPLv2
#
# Copyright (c) 2013 Fabian Affolter <fabian at affolter-engineering.ch>
TFTP_PATH=/var/lib/tftpboot
yum -y install tftp-server syslinux
@fabaff
fabaff / gist:5489183
Created April 30, 2013 14:44
systemd service unit for pywebserve
[Unit]
Description=A simple python Web server
After=network.target
[Service]
Type=simple
User=root
ExecStart=/usr/bin/python /var/www/pywebserve/pywebserve.py
[Install]
@fabaff
fabaff / gist:5489197
Created April 30, 2013 14:46
systemd service unit for node.js http-server
[Unit]
Description=A simple node.js Web server
After=network.target
[Service]
Type=simple
User=nobody
Group=nobody
Restart=always
ExecStart=/usr/bin/http-server /var/www/nodejs -p 8888 -s
#!/bin/sh
#----
# bootstrap fedora21
#release=$(cat /etc/fedora-release | awk '/^Fedora/ {print $3}')
#arch=$(arch)
release=21
arch=x86_64
ROOTFS=/var/lib/libvirt/lxc/fedora$release-$arch
@fabaff
fabaff / gist:5841487
Created June 22, 2013 16:31
A simple bash script to put the Qualcomm firmware in place on a Lenovo T410.
#!/usr/bin/bash
#
# This simple script put the Qualcomm firmware in place to use with gobi_loader.
#
# Copyright (c) 2013 Fabian Affolter <fabian@affolter-engineering.ch>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
@fabaff
fabaff / set-bridge.sh
Last active December 25, 2015 14:58
Simple script to setup a bridge on Fedora.
#!/bin/bash
#
# Copyright (c) 2011-2013 Fabian Affolter <fabian@affolter-engineering.ch>
# Released under the MIT license.
#
# This bash script setup a transparent and non-permanent bridge for
# wire-tapping.
#
BRNAME=br0 # Bridge name
IFNAME1=em1 # Primary card
#include <SPI.h>
#include <Ethernet.h>
#include <PubSubClient.h>
/* ------------------ */
/* SKETCH CREDENTIALS */
/* ------------------ */
char* deviceId = "<DEVICE-ID>"; // * set your device id (will be the MQTT client username)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fabaff
fabaff / keybase.md
Created August 19, 2016 15:42
keybase.md

Keybase proof

I hereby claim:

  • I am fabaff on github.
  • I am fabaff (https://keybase.io/fabaff) on keybase.
  • I have a public key whose fingerprint is 2F6C 930F D3C4 7E38 6AFA 4EB4 E23C D2DD 36A4 397F

To claim this, I am signing this object:

@fabaff
fabaff / 0_reuse_code.js
Created February 25, 2017 20:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console