Skip to content

Instantly share code, notes, and snippets.

View vkoop's full-sized avatar

Viktor Koop vkoop

View GitHub Profile
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<style type="text/css">
td {
word-wrap: break-word;
}
</style>
</head>
<body>
@vkoop
vkoop / system_setup.sh
Last active May 12, 2021 18:49
setup dotfiles, change shell, install some packages
#!/usr/bin/env bash
#define some packages that are needed
PACKAGES_TO_INSTALL=(git curl vim zsh tmux);
PACKAGE_MANAGER=$1
if [[ "$PACKAGE_MANAGER" == "apt" ]]
then
INS_CMD="apt-get install"
@vkoop
vkoop / gist:c0a603f547216bb110a9
Last active August 29, 2015 14:25
raspberry_pi_network.md

enable port forwarding

  • modify /etc/sysctl.conf
  • uncomment
net.ipv4.ip_forward=1

network config (/etc/network/interfaces)

# Configuration file for dnsmasq.
#
# Format is one option per line, legal options are the same
# as the long options legal on the command line. See
# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details.
# Listen on this specific port instead of the standard DNS port
# (53). Setting this to zero completely disables DNS function,
# leaving only DHCP and/or TFTP.
#port=5353
@vkoop
vkoop / inheritance.js
Created March 19, 2015 08:50
JavaScript Inheritance
/**
* @see http://phrogz.net/JS/classes/OOPinJS2.html
*/
Function.prototype.inheritsFrom = function( parentClassOrObject ){
if ( parentClassOrObject.constructor == Function )
{
//Normal Inheritance
this.prototype = new parentClassOrObject;
this.prototype.constructor = this;
this.prototype.parent = parentClassOrObject.prototype;
@vkoop
vkoop / network_benchmark.txt
Created December 13, 2014 10:55
benchmark networdk
Client:
nc -l -p 2222 | pv -rtb > /dev/null
Server:
pv -r /dev/zero | nc $CLIENTIP 2222
@vkoop
vkoop / mvim_fix.sh
Created November 2, 2014 12:21
MacVim homebrew python fix
cd /usr/local/Cellar/macvim/7.3-66/MacVim.app/Contents/MacOS/
install_name_tool -change /System/Library/Frameworks/Python.framework/Versions/2.7/Python /usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/Python MacVim
install_name_tool -change /System/Library/Frameworks/Python.framework/Versions/2.7/Python /usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/Python Vim
@vkoop
vkoop / dell_2100_wlan.sh
Created October 7, 2014 07:49
Dell 2100 Install Wlan
sudo apt-get update
sudo apt-get install bcmwl-kernel-source
sudo modprobe -r b43 ssb wl
sudo modprobe wl
@vkoop
vkoop / ubuntu_install_java.sh
Created October 7, 2014 07:41
Install Java - Ubunut
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
@vkoop
vkoop / updatedyndns.sh
Created September 30, 2014 19:07
Update dyndns with current ip
#!/bin/bash
IP=`dig +short myip.opendns.com @resolver1.opendns.com`
curl --user "$1:$2" "http://dyndns.kasserver.com/?myip=$IP"