Skip to content

Instantly share code, notes, and snippets.

View segabor's full-sized avatar

Gábor Sebestyén segabor

View GitHub Profile
@rafaelfess
rafaelfess / README.md
Last active August 14, 2024 13:27
EdgeOS: Scheduled PPPoE reconnect configuration #EdgeRouter

EdgeOS: Scheduled PPPoE reconnect configuration

It will restart the PPPoE connection every day at 7a.m

The benefit to using the task-scheduler is that your commands get saved in config folder which ensures that they get copied over during firmware upgrades.

Creating the script file

cd /config/user-data && sudo mkdir scripts && sudo chown root scripts && cd scripts
@2xsaiko
2xsaiko / setup-vulkan-wine.sh
Last active November 7, 2018 12:45
Vulkan on Wine setup script
#!/bin/bash
query_abort() {
printf "==> %s [Y/n] " "$1"
read -n 1 response
case "$response" in
'Y'|'y'|'')
;;
*)
printf "\n%s\n" "Aborting."
@dmtucker
dmtucker / ipv6-erl.md
Last active August 9, 2024 09:13
Configuring IPv6 on EdgeRouter Lite

Configuring IPv6 on EdgeRouter Lite

Tested with:

  • v1.9.7+hotfix.4, Wave G in Seattle
  • v1.10.5, Comcast in the South Bay Area
set interfaces ethernet eth0 description LAN
set interfaces ethernet eth1 description WAN
set interfaces ethernet eth2 description WLAN
#!/bin/sh
. /etc.defaults/rc.subr
case $1 in
start)
/var/packages/debian-chroot/scripts/start-stop-status start
chroot /volume1/@appstore/debian-chroot/var/chroottarget service cron start
chroot /volume1/@appstore/debian-chroot/var/chroottarget service dnsmasq start
chroot /volume1/@appstore/debian-chroot/var/chroottarget service lighttpd start

There are 3 plugins for generating to create a JAR-File in maven:

  • maven-jar-plugin
  • maven-assembly-plugin
  • maven-shade-plugin

maven-jar-plugin:This plugin provides the capability to build and sign jars.But it just compiles the java files under src/main/java and /src/main/resources/.It doesn't include the dependencies JAR files.

<!--exclude all xml files from the jar-->
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
#include <stdio.h>
#include <jni.h>
JNIEnv* create_vm() {
JavaVM* jvm;
JNIEnv* env;
JavaVMInitArgs args;
JavaVMOption options[1];
/* There is a new JNI_VERSION_1_4, but it doesn't add anything for the purposes of our example. */