Skip to content

Instantly share code, notes, and snippets.

View mbe24's full-sized avatar

Mikael Beyene mbe24

View GitHub Profile
@lancecarlson
lancecarlson / cmd.sh
Created January 19, 2016 15:57
ZeroMQ HTTP example
clang -Wall http.c -o http -L/usr/local/Cellar/zeromq/4.0.5_2/lib/ -lzmq && ./http
@li-salvadorlopez
li-salvadorlopez / wsdl2code.gradle
Created January 16, 2015 19:16
Gradle axis2 wsdl2code
configurations {
axisGenAntTask
}
dependencies {
axisGenAntTask "org.apache.axis2:axis2:1.6.2",
"org.apache.axis2:axis2-tools:1.1.1",
'org.apache.neethi:neethi:2.0.2',
'org.apache.ws.commons.schema:XmlSchema:1.4.7',
'org.apache.ws.commons.axiom:axiom-api:1.2.14',

HEADLESS RASPBERRY PI SETUP WITH OS X

Creating a disk image:

http://txfx.net/2012/12/05/raspberry-pi-headless-setup/

$ sudo diskutil unmount /dev/disk1s1
$ sudo dd bs=1M if=/Users/axelav/Downloads/rpi.img of=/dev/rdisk1 # NOTE: `disk1s1` becomes `rdisk1` DONT FUCK THIS UP
$ sudo diskutil eject /dev/rdisk1
@ptb
ptb / adblock-openwrt.sh
Last active February 24, 2017 14:08
OpenWRT pixelserv, dnsmasq, ad block
#!/bin/sh
DNSSERVER=172.16.1.1
/usr/bin/wget -qO- http://mvps.org/winhelp2002/hosts.txt | /bin/grep -v -e localhost -e=feeds.feedburner.com | /bin/grep '^0.0.0.0' | /bin/sed "s/^0\.0\.0\.0/$DNSSERVER/" | /bin/sed 's/\s*#.*$//' | /bin/sed 's/.$//' > /etc/hosts.block-1
/usr/bin/wget -qO- http://www.malwaredomainlist.com/hostslist/hosts.txt | /bin/grep -v -e localhost | /bin/grep '^127.0.0.1' | /bin/sed "s/^127\.0\.0\.1/$DNSSERVER/" | /bin/sed 's/\s*#.*$//' | /bin/sed 's/.$//' > /etc/hosts.block-2
/usr/bin/wget -qO- http://hosts-file.net/ad_servers.txt | /bin/grep -v -e localhost | /bin/grep '^127.0.0.1' | /bin/sed "s/^127\.0\.0\.1/$DNSSERVER/" | /bin/sed 's/\s*#.*$//' | /bin/sed 's/.$//' > /etc/hosts.block-3
/usr/bin/wget -qO- http://adaway.org/hosts.txt | /bin/grep -v -e localhost | /bin/grep '^127.0.0.1' | /bin/sed "s/^127\.0\.0\.1/$DNSSERVER/" | /bin/sed 's/\s*#.*$//' | /bin/sed 's/.$//' > /etc/hosts.block-4
/bin/cat /etc/hosts.block-1 /etc/hosts.block-2 /etc/hosts.block-3 /etc/hosts.block-4 | /bin/sed 's/
@aslakknutsen
aslakknutsen / start_testing_java8_today.asciidoc
Last active May 10, 2024 20:15
Example of how to use both JDK 7 and JDK 8 in one build.

JDK 8 Released

Most of us won’t be able to use/deploy JDK 8 in production for a looong time. But that shouldn’t stop us from using it, right?

It should be possible to sneak in JDK 8 in the back way, the same way we snuck in Groovy and other libraries we wanted to use.

The Test Suite to the rescue

The Maven compiler plugin run in two separate lifecycles, compile and testCompile. Those can be configured separately.

@ntrepid8
ntrepid8 / ddns_provider.conf
Created September 21, 2013 19:07
This is the /etc.defaults/ddns_provider.conf file for Synology DiskStation NAS devices with a provider added for DNSMadeEasy.com DynamicDNS service.
# Input:
# 1. DynDNS style request:
# Input:
# Input:
# 1. DynDNS style request:
# modulepath = DynDNS
# queryurl = [Update URL]?[Query Parameters]
#
# 2. Self-defined module:
# modulepath = /sbin/xxxddns