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
### Keybase proof | |
I hereby claim: | |
* I am nalcheg on github. | |
* I am nalcheg (https://keybase.io/nalcheg) on keybase. | |
* I have a public key ASBcrwlKVOiUUbEtPRCoTQMcmZGpcgn9gQ3t8R9a62Exego | |
To claim this, I am signing this object: |
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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"os" | |
"strconv" | |
"sync" |
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 | |
## usage: ./download_magnet_url.sh "magnet_link" | |
## magnet link shoul be enclosed in quotes. | |
cd ./torrent_auto # set your watch directory here | |
[[ "$1" =~ xt=urn:btih:([^&/]+) ]] || exit; | |
echo "d10:magnet-uri${#1}:${1}e" > "meta-${BASH_REMATCH[1]}.torrent" |
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
BenchmarkPgx-4 2466 527680 ns/op | |
BenchmarkSqlx-4 1868 619418 ns/op | |
BenchmarkGorm-4 351 3069103 ns/op |
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 bash | |
again="yes" | |
while [ "$again" = "yes" ] | |
do | |
LASTRULE="$(iptables -nvL INPUT --line | fgrep 'virbr0' | cut -d' ' -f1 | head -c 1)" | |
if [[ -n "${LASTRULE}" ]] | |
then | |
iptables -D INPUT ${LASTRULE} | |
echo "iptables -D INPUT ${LASTRULE}" |
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
// ==UserScript== | |
// @name Fix Webogram width | |
// @namespace webogram.fixes | |
// @match https://web.telegram.org/* | |
// @version 2 | |
// @grant none | |
// ==/UserScript== | |
function addGlobalStyle(css) { | |
var head, style; |
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 bash | |
coin="$1"; | |
if [ -z $coin ]; then | |
/bin/echo "No coin given... using btc as default"; | |
coin="bitcoin"; | |
fi | |
count=$(${coin}-cli getblockcount); | |
/bin/echo "block count: $count"; |
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
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: sharevol | |
spec: | |
containers: | |
- name: c1 | |
image: centos:7 | |
command: | |
- "bin/bash" |
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 | |
TODAY=`date +"%Y-%m-%d"` | |
echo "==`date`== BEGIN XTRABACKUP ====================================" >> /var/log/xtralog | |
ulimit -n 4094 | |
rm -fr /var/backups/xtrabackupCurrent | |
xtrabackup --user=user --password=password --backup --target-dir=/var/backups/xtrabackupCurrent | |
xtrabackup --user=user --password=password --prepare --target-dir=/var/backups/xtrabackupCurrent |
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 | |
# | |
# Copyright (c) 2015, Intel Corporation | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# | |
# * Redistributions of source code must retain the above copyright notice, | |
# this list of conditions and the following disclaimer. | |
# * Redistributions in binary form must reproduce the above copyright |
NewerOlder