Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block vans163

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
vans163 / lsyncd_example
Created Jun 29, 2019
using lsyncd instead of sshfs
View lsyncd_example
git clone
apt-get install cmake liblua5.3-dev lua5.3
git apply << EOF
diff --git a/default-rsync.lua b/default-rsync.lua
index 106c58d..8157c26 100644
--- a/default-rsync.lua
+++ b/default-rsync.lua
@@ -669,7 +669,7 @@ end
View sock_nif
//gcc -O3 -fpic -shared -I/usr/lib/erlang/usr/include/ nif_tcp.c -o
#include "erl_nif.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
vans163 /
Created Sep 17, 2017
Gnome 3.26 Setup
gsettings set edge-tiling false
View windows_cifs.bat
cmdkey /add:$serverIP /user:$serverIP\$unixAccoutnName /pass:$password
net use S: \\\myshare /SAVECRED /PERSISTENT:YES
net use Z: /delete
View saltstack_erlang2
mkdir -p /srv/salt
#ulimit -n 63536
#top -aSCHIP
# sysctl dev.igb | grep -v ": 0"
# pfctl -si
vans163 /
Last active May 20, 2019
Virtualbox Commandline stuff
#Create storage
VBoxManage createhd --filename VMName.vdi --size 40000 --format VDI
VBoxManage modifyhd GoDial.vdi --resize 30500
VBoxManage list hdds
VBoxManage closemedium disk $(UUID) --delete
#Create VM
VBoxManage createvm --name "VMName" --ostype Windows7_64 --register
vans163 / saltstack_commands
Last active Sep 23, 2016
Saltstack Commands
View saltstack_commands
dnf install salt-master
systemctl enable salt-master
systemctl start salt-master
salt-master -l debug
echo "failhard: True" >> /etc/salt/master
salt '*' state.show_highstate #top.sls
salt 'minion1' state.show_sls examples #example.sls
vans163 / saltstack_erlang_dev
Last active Sep 24, 2016
Saltstack erlang development configuration
View saltstack_erlang_dev
# "(( id|processo).*:|^ *$)" /proc/cpuinfo
- path: /etc/default/grub
- repl: 'GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on isolcpus=1-15,17-31 nohz_full=1-15,17-31 rcu_nocbs=1-15,17-31 default_hugepagesz=1GB hugepagesz=1GB hugepages=8"'
#cat /proc/cmdline
vans163 / escape_uri.erl
Created Dec 21, 2015
Erlang escape uri for POST request
View escape_uri.erl
%escape uri
escape_uri(S) when is_list(S) ->
escape_uri(<<C:8, Cs/binary>>) when C >= $a, C =< $z ->
[C] ++ escape_uri(Cs);
escape_uri(<<C:8, Cs/binary>>) when C >= $A, C =< $Z ->
[C] ++ escape_uri(Cs);
escape_uri(<<C:8, Cs/binary>>) when C >= $0, C =< $9 ->
[C] ++ escape_uri(Cs);
escape_uri(<<C:8, Cs/binary>>) when C == $. ->
vans163 / random_mac_address.erl
Created Dec 21, 2015
Erlang random mac address
View random_mac_address.erl
random_mac() ->
string:join([integer_to_list(random:uniform(255), 16) || X <- [1,2,3,4,5,6]], ":").
You can’t perform that action at this time.