Skip to content

Instantly share code, notes, and snippets.

View leleobhz's full-sized avatar
🇧🇷

Leonardo Amaral leleobhz

🇧🇷
View GitHub Profile
--- /etc/NetworkManager/dnsmasq.d/00_popcorn.conf.orig 1969-12-31 21:00:00.000000000 -0300
+++ /etc/NetworkManager/dnsmasq.d/00_popcorn.conf 2014-10-12 09:09:51.741520058 -0300
@@ -0,0 +1 @@
+host-record=app.time4popcorn.eu,141.101.113.16,190.93.240.16,141.101.123.16,190.93.241.16,190.93.242.16
PPC RunAbove:
=============
No -mcpu=power8, Ubuntu, GIT at 5fd5453e594ee6cadf4a3c502bc53d28cfe5aa8b
---------------
leleobhz@cj-bench:~/ovelha/Stockfish/src$ make -j8 build ARCH=ppc-64
make ARCH=ppc-64 COMP=gcc config-sanity
make[1]: Entering directory '/home/leleobhz/ovelha/Stockfish/src'
@leleobhz
leleobhz / openwrt_metarouter_1407-fix-rxbuf.patch
Created June 18, 2015 03:08
Fix RXBUF_SIZE to avoid skb_put crash by exceding buffer - as described in https://www.fsl.cs.sunysb.edu/kernel-api/re511.html - the original patch crashed at 300bytes packet, so i found the 10300 bytes for a jumbo-frame buffer-compat.
diff -puNrb openwrt/target/linux/mr-mips/base-files/etc/hotplug2-init.rules openwrt-new/target/linux/mr-mips/base-files/etc/hotplug2-init.rules
--- openwrt/target/linux/mr-mips/base-files/etc/hotplug2-init.rules 1970-01-01 01:00:00.000000000 +0100
+++ openwrt-new/target/linux/mr-mips/base-files/etc/hotplug2-init.rules 2014-01-09 14:06:32.000000000 +0000
@@ -0,0 +1,8 @@
+$include /etc/hotplug2-common.rules
+
+DEVICENAME ~~ (hvc) {
+ nothrottle
+ makedev /dev/%DEVICENAME% 0666
+ next
@leleobhz
leleobhz / halo
Created February 28, 2016 12:54
Mikrotik Halo Into Theme - Incomplete
:beep frequency=329 length=1.2s;
:delay 1.3s;
:beep frequency=369 length=600ms;
:delay 600ms;
:beep frequency=392 length=600ms;
:delay 600ms;
:beep frequency=369 length=600ms;
@leleobhz
leleobhz / 4.5.0_Rename_NETIF_F_ALL_CSUM_to_NETIF_F_CSUM_MASK_a188222b6ed29404ac2d4232d35d1fe0e77af370.diff
Created March 17, 2016 20:37
patches/4.5.0_Rename_NETIF_F_ALL_CSUM_to_NETIF_F_CSUM_MASK_a188222b6ed29404ac2d4232d35d1fe0e77af370.diff
--- ixgbe-4.3.13/src/ixgbe_main.c.orig 2016-03-17 16:08:15.760575400 -0300
+++ ixgbe-4.3.13/src/ixgbe_main.c 2016-03-17 16:08:50.887574276 -0300
@@ -9574,7 +9574,7 @@
if (unlikely(skb_inner_mac_header(skb) - skb_transport_header(skb) >
IXGBE_MAX_TUNNEL_HDR_LEN))
- return features & ~NETIF_F_ALL_CSUM;
+ return features & ~NETIF_F_CSUM_MASK;
return features;
@leleobhz
leleobhz / ixgbe-4.3.13dkms.conf
Created March 17, 2016 20:39
ixgbe-4.3.13/dkms.conf
PACKAGE_NAME="ixgbe"
PACKAGE_VERSION="4.3.13"
CLEAN="cd src/; make clean"
MAKE="cd src/; make BUILD_KERNEL=\${kernelver} noisy"
PATCH[0]=4.5.0_Rename_NETIF_F_ALL_CSUM_to_NETIF_F_CSUM_MASK_a188222b6ed29404ac2d4232d35d1fe0e77af370.diff
# For now, dont work, this patch must be applied to >4.5.0 kernel only
#PATCH_MATCH[0]="^(?:4)\.(?:[5-9]|[1-9][0-9])\.(?:[0-9]|[1-9][0-9])(?:.+|$)"
BUILT_MODULE_LOCATION[0]="src/"
BUILT_MODULE_NAME[0]="ixgbe"
DEST_MODULE_LOCATION[0]="/updates"
#!/bin/bash
images=0
rm -f *.jpg
avconv -i ${1} -qscale:v 1 -vcodec mjpeg -qmin 1 -qmax 1 %09d.jpg
for i in $(ls | grep .jpg); do
let images=images+1
1) mpv Doctor.Who.2005.S09E11.Heaven.Sent.1080p.WEB-DL.DD5.1.H.264-CtrlHD.mkv -no-audio -ss 3093.1251 -end 3096.885 -o wallpaper.mp4 -profile enc-f-mp4
2) mkdir images ; cd images
3) vaievem.sh ../wallpaper.mp4
4) https://play.google.com/store/apps/details?id=com.ccpcreations.android.VLW
#!/bin/bash
if [[ "`cat /sys/kernel/mm/ksm/run`" -ne 1 && `ps aux | grep "\[ksmd\]" | awk '{print $11}'` == [ksmd] ]] ; then
echo 'KSM is not enabled. Run echo 1 > /sys/kernel/mm/ksm/run' to enable it.
exit 1
fi
echo Shared memory is $((`cat /sys/kernel/mm/ksm/pages_shared`*`getconf PAGE_SIZE`/1024/1024)) MB
echo Saved memory is $((`cat /sys/kernel/mm/ksm/pages_sharing`*`getconf PAGE_SIZE`/1024/1024)) MB
if ! `type bc &>/dev/null` ; then
@leleobhz
leleobhz / zt_techfaq_pt_BR.txt
Created February 4, 2017 16:12
ZeroTier TechFAQ pt_BR - Partial
** Como o ZeroTier funciona? **
Os nós de endpoint ZeroTier formam uma rede ponto a ponto e usam um conjunto de nós pré configurados chamados servidores raiz (Atualmente rodados por nós, federação está nos planos) como pontos de ancoragem estaveis para uma conexão de peer quase instantânea e sem configuração prévia. Nas documentações antigass nós chamavamos de super nós, mas começamos a chama-los de raiz porque suas funções são mais limitadas do que implica o termo super e está mais próximo do que seria um servidor raiz de DNS. Eles executam o mesmo programa de código aberto que um nó ZeroTier regular. Eles são simplesmente "abençoados" como nós principais e rodam em datacenters gigantes com redes rápidas de IP fixo.
Nós chamamos esta rede ponto a ponto de Virtual Layer 1 (VL1). No modelo OSI de arquitetura de redes, este seria o "cabo". Como ZeroTier se trata de virtualização de redes, estes cabos são imaginários, feitos de matemática (criptografia e endereçamento, no lugar de cabos físicos ou radio enlace