This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# global_conf.json for https://github.com/hallard/single_chan_pkt_fwd.git | |
{ | |
"SX127x_conf": | |
{ | |
"freq": 868100000, | |
"spread_factor": 7, | |
"pin_nss": 6, | |
"pin_dio0": 7, | |
"pin_rst": 0 | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Title color */ | |
.site-header .site-branding .site-title a { | |
color: #7dae33ff; | |
} | |
/* Align logo and title for al devices */ | |
@media (min-width:769px) { | |
.site-branding { | |
display: inline-block; | |
/* Adjunst depending text lenght */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Lua snippet to use with wrk to test (stress / benchmark) urls skipping CDN / Framework / misc | |
-- cache by adding a 'random' querystring | |
-- | |
-- To use it adjust wrk params and do something like this: | |
-- docker run --rm -v $(pwd)/cache-killer.lua:/cache-killer.lua skandyla/wrk -c 1 -d 1 -t 1 --script /cache-killer.lua http://www.yoursite/testpath | |
request = function() | |
path = wrk.path | |
if path.find(path, "?") then | |
path = path .. "&" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIFF_PARAMS="-aur --color=auto" | |
# Precondition check | |
which jq > /dev/null || (echo "jq is required" && exit 1) | |
# Arg check | |
for arg in "$@"; do | |
shift |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21:00 1,77% | |
21:03 2,25% | |
21:06 2,89% | |
21:09 3,48% | |
21:12 4,18% | |
21:15 5,21% | |
21:18 6,38% | |
21:21 7,77% | |
21:24 9,54% | |
21:27 11,74% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
url="https://resultats.parlament2017.cat/09AU/DAU09999CM.htm" | |
last="" | |
while true | |
do | |
hour=$(curl -s "$url?$RANDOM" | \ | |
grep '="hora"> .* <\/span>' | \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import signal | |
import sys | |
from time import sleep | |
def sig_h(signal, frame): | |
global n | |
print("Signal! n: {}".format(n)) | |
signal.signal(signal.SIGINT, sig_h) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import locale | |
import codecs | |
import operator | |
import sys | |
from re import match | |
from pprint import pprint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from sys import exit | |
import click | |
from requests import get | |
############################### | |
# Amazon Linux: | |
# yum install python-35 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mikrotik script to update DuckDNS.org domain, to use it: | |
# - Download it as `duckdns-update` | |
# - Tune your `duckToken` and `duckDomain` variables | |
# - Copy it to your router: | |
# `scp duckdns-update user@you-router:` | |
# - Add the script | |
# `/system script add name=duckdns-update source=[ /file get duckdns-update contents ]` | |
# - Add a periodic task to execute it | |
# `/system scheduler add name=duckdns-updater interval=1h on-event=duckdns-update` | |
# - Or execute it manully |
NewerOlder