Skip to content

Instantly share code, notes, and snippets.

View config.rsc
# may/28/2020 21:53:06 by RouterOS 6.46.6
# software id = ISSB-RQLV
#
# model = RB750Gr3
/interface bridge
add comment="LAN Switch" name=bridge
/interface ethernet
set [ find default-name=ether1 ] comment="ISP Claro" name=wan1
set [ find default-name=ether2 ] comment="ISP Movistar" name=wan2
/interface list
View dhcp2.log
17:08:03 interface,info wan2 link up (speed 1G, full duplex)
17:08:03 dhcp,debug,state dhcp-client on wan2 entering <selecting...> state
17:08:03 dhcp,debug,packet dhcp-client on wan2 sending discover with id 2763417222 to 255.255.255.255
17:08:03 dhcp,debug,packet flags = broadcast
17:08:03 dhcp,debug,packet ciaddr = 0.0.0.0
17:08:03 dhcp,debug,packet chaddr = 74:4D:28:--:--:--
17:08:03 dhcp,debug,packet Msg-Type = discover
17:08:03 dhcp,debug,packet Parameter-List = Subnet-Mask,Classless-Route,Router,Static-Route,Domain-Server,NTP-Server,CAPWAP-Server,Vendor-Specific
17:08:03 dhcp,debug,packet Host-Name = "hex"
17:08:03 dhcp,debug,packet Client-Id = 01-74-4D-28-__-__-__
View dhcp.log
16:54:26 dhcp,debug,state dhcp-client on wan2 entering <stopped> state
16:54:26 dhcp,info dhcp-client on wan2 lost IP address 192.168.1.10 - lease stopped locally
16:54:26 dhcp,debug,packet dhcp-client on wan2 sending release with id 201958310 to 192.168.1.1
16:54:26 dhcp,debug,packet ciaddr = 192.168.1.10
16:54:26 dhcp,debug,packet chaddr = 74:4D:28:--:--:--
16:54:26 dhcp,debug,packet Msg-Type = release
16:54:26 dhcp,debug,packet Server-Id = 192.168.1.1
16:54:26 dhcp,debug,packet Client-Id = 01-74-4D-28-__-__-__
16:54:26 dhcp,debug,state dhcp-client on wan2 entering <selecting...> state
16:54:26 system,info netwatch host modified
View coso.scad
$altura = 11;
$c = 90;
difference() {
difference() {
cube([354, 253, $altura]);
translate([5, 5, 3])
cube([344, 223, 8]);
};
@nachopro
nachopro / afraid_update.sh
Created Oct 20, 2019
Free DNS Afraid update utility
View afraid_update.sh
#!/bin/sh
iface='pppoe0'
afraid='-- GET IT AT https://freedns.afraid.org/dynamic/ --'
ip=$(/sbin/ip -o -4 addr list $iface | awk '{print $4}' | cut -d/ -f1)
url="https://freedns.afraid.org/dynamic/update.php?$afraid&address=$ip"
curl "$url"
View .gitconfig
[core]
editor = vim
[alias]
hist = log --pretty=format:\"%C(yellow)%h%Creset %C(cyan)%ad%Creset %s [%Cgreen%an%Creset]\" --graph --date=short
View ip_update.sh
#!/bin/sh
CURRENT_IP=/tmp/current_ip
ASSIGNED_IP=/tmp/assigned_ip
test -e $ASSIGNED_IP || touch $ASSIGNED_IP
curl http://ip.init.gdn:8989/txt -s -o $CURRENT_IP
cmp $CURRENT_IP $ASSIGNED_IP -s || (curl https://freedns.afraid.org/dynamic/update.php?__HASH_HERE__ && cp $CURRENT_IP $ASSIGNED_IP && echo "IP updated $(cat $CURRENT_IP)")
View coso.go
package main
import (
// "encoding/json"
"context"
"fmt"
"net/http"
"os"
"os/signal"
"strconv"
View app.go
package main
import (
// "encoding/json"
"context"
"fmt"
"net/http"
"os"
"os/signal"
"syscall"
View gist:84ea7d31763d4a45f27451d9d86e40a9
$ cat .local/share/xorg/Xorg.0.log
[ 41.701]
X.Org X Server 1.19.3
Release Date: 2017-03-15
[ 41.701] X Protocol Version 11, Revision 0
[ 41.701] Build Operating System: Linux 4.9.11-1-ARCH x86_64
[ 41.702] Current Operating System: Linux sache 4.11.7-1-ARCH #1 SMP PREEMPT Sat Jun 24 09:07:09 CEST 2017 x86_64
[ 41.702] Kernel command line: initrd=\initramfs-linux.img cryptdevice=/dev/sda4:disco root=/dev/mapper/disco rw
[ 41.702] Build Date: 07 April 2017 05:42:48PM
[ 41.702]