Skip to content

Instantly share code, notes, and snippets.

View efwe's full-sized avatar
🏠
Working from home

frank waldheim efwe

🏠
Working from home
View GitHub Profile
@efwe
efwe / gist:9388989
Last active August 29, 2015 13:57
netstat -rn
~ netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 78.47.148.17 UGS 0 241 re0
78.47.148.16/28 link#1 U 0 0 re0
78.47.148.26 link#1 UHS 0 0 lo0
127.0.0.1 link#2 UH 0 0 lo0
@efwe
efwe / gist:9388440
Last active August 29, 2015 13:57
ifconfig hetztner vserver
~ ifconfig -a
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LINKSTATE>
ether 00:1c:14:01:0f:f0
inet 78.47.148.26 netmask 0xfffffff0 broadcast 78.47.148.31
inet6 fe80::21c:14ff:fe01:ff0%re0 prefixlen 64 scopeid 0x1
inet6 2a01:4f8:d13:b0b::2 prefixlen 64
nd6 options=8021<PERFORMNUD,AUTO_LINKLOCAL,DEFAULTIF>
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
@efwe
efwe / gist:9390376
Created March 6, 2014 14:03
/etc/rc.conf freeBSD 10 - hetzner - ipv6
ipv6_default_interface="re0"
ifconfig_re0_ipv6="inet6 2a01:4f8:d13:b0b::2 prefixlen 64"
ipv6_defaultrouter="2a01:4f8:d13:b0b::1"
@efwe
efwe / gist:9390873
Created March 6, 2014 14:24
traceroute6 -v -m 64 target.fauad.de
traceroute6 to traceroute.fauad.de (2001:470:1f0b:1d0f:23::ff) from 2a01:4f8:d13:b0b::2, 64 hops max, 12 byte packets
1
16 bytes from 2a00:1450:4001:809::1009 to 2a01:4f8:d13:b0b::2: icmp type 129 (Echo Reply) code 0
0000: 531884a1 00030743 00000000 00000000
16 bytes from 2a00:1450:4001:809::1009 to 2a01:4f8:d13:b0b::2: icmp type 129 (Echo Reply) code 0
0000: 531884a2 000303ac 00000000 00000000
16 bytes from 2a00:1450:4001:809::1009 to 2a01:4f8:d13:b0b::2: icmp type 129 (Echo Reply) code 0
0000: 531884a3 0002fcc6 00000000 00000000
@efwe
efwe / gist:9413273
Created March 7, 2014 15:14
idea 13 - gradle integration
2014-03-07 16:13:02,638 [ 249122] INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from D:\java\jdk1.7.0_11
2014-03-07 16:13:03,671 [ 250155] INFO - .project.GradleProjectResolver - Gradle project resolve error
org.gradle.tooling.GradleConnectionException: Could not fetch model of type 'BasicIdeaProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.0-bin.zip'.
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:55)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
at org.gradle.tooling.internal.consu
@efwe
efwe / gpx_parser.rb
Created September 30, 2014 14:09
My GPX parser
require 'nokogiri'
require 'date'
require 'geo-distance'
#
class GpxParser
attr_accessor :doc , :creators
@efwe
efwe / gist:0efdfc72baab007c4d87
Created October 1, 2014 05:39
first and last two trackpoints.
<trkpt lat="50.8024286292" lon="20.4709493648">
<ele>132.80</ele>
<time>2014-09-28T09:41:53Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>114</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>
<trkpt lat="50.8026127797" lon="20.4715069290">
@efwe
efwe / SpringBeanResolver.java
Last active August 29, 2015 14:25
Resolve beans from classes which are not beans
@Component
public class SpringBeanResolver
{
@Autowired
private ApplicationContext applicationContext;
private static SpringBeanResolver instance;
private SpringBeanResolver()
{
@efwe
efwe / init.gradle
Created June 19, 2012 11:15 — forked from cybo42/init.gradle
Gradle Growl Notifications
// File: ~/.gradle/init.gradle
class GrowlNotifyListener extends BuildAdapter {
void buildFinished(BuildResult result) {
def projectName = result?.gradle?.rootProject?.project?.name
// skip buildSrc
if (!projectName.equals("buildSrc")) {
if (result.failure) {
growlNotify "Gradle [$projectName]: failure", result.failure.message, true
} else {
growlNotify "Gradle [$projectName]: finished", 'Build successful'
@efwe
efwe / jboss-deployment-structure.xml
Created August 15, 2012 07:08
jboss 7 AS deployment structure which allows castor and jaxb with internal xerces and also references apache xerces for GregorianCalendar
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
<deployment>
<dependencies>
<system>
<paths>
<!-- for castor - see castor.properties -->
<path name="com/sun/org/apache/xml/internal/serialize"/>
<path name="com/sun/org/apache/xerces/internal/parsers"/>
</paths>
</system>