Skip to content

Instantly share code, notes, and snippets.

@weisi
weisi / update-resolv-conf
Created January 25, 2012 08:55
update-resolv-conf for openSUSE, using SUSE's netconfig with dirty tricks. No need for resolvconf.
#!/bin/bash
#
# Parses DHCP options from openvpn to update resolv.conf
# To use set as 'up' and 'down' script in your openvpn *.conf:
# up /etc/openvpn/update-resolv-conf
# down /etc/openvpn/update-resolv-conf
#
# Used snippets of resolvconf script by Thomas Hood <jdthood@yahoo.co.uk>
# and Chris Hanson
# Licensed under the GNU GPL. See /usr/share/common-licenses/GPL.
@RumataEstor
RumataEstor / erlasm
Created December 12, 2010 00:59
A script to take erlang code from the command line and display the generated BEAM assembler.
#! /usr/bin/env escript
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% erlasm
% A script to take erlang code from the command line and display the generated
% BEAM assembler. The passed-in code must consist of one or more complete
% functions.
%
main (Strings) ->
Asm = lists:flatten(