- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
- They are the people who get things done. Effective Engineers produce results.
#!/bin/sh | |
readonly cluster_topology=$(redis-cli -h redis-cluster cluster nodes) | |
readonly slaves=$(echo "${cluster_topology}" | grep slave | cut -d' ' -f2,4 | tr ' ' ',') | |
readonly backup_dir="/opt/redis-backup" | |
mkdir -p ${backup_dir} | |
for slave in ${slaves}; do | |
master_id=$(echo "${slave}" | cut -d',' -f2) |
package main | |
import ( | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"net/http" | |
"net/http/httputil" | |
"net/url" |
use constant PRIMITIVES => join( '', 0 .. 9, 'a' .. 'z', 'A' .. 'Z' ); | |
sub encode_base62 { | |
my( $num ) = @_; | |
my @c; | |
do { | |
push( @c, substr( PRIMITIVES, $num % length(PRIMITIVES), 1 ) ); | |
$num = int( $num / length(PRIMITIVES) ); | |
} while( $num ); | |
join( '', reverse @c ); |
Note: This gist may be outdated, thanks to all contributors in comments.
adb
is the Android CLI tool with which you can interact with your android device, from your PC
You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.
Don't hesitate to read comments, there is useful tips, thanks guys for this !
package mycrypto | |
import ( | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"encoding/base64" | |
"io" | |
"time" | |
) |
#!/usr/bin/env bash | |
# Josh Skidmore <[email protected]> | |
# Basic example of using an HTTP range header to extract EXIF data | |
# from a JPEG file without having to download the entire image. | |
# This has no error handling and assumes the EXIF data is embedded | |
# within the first $KB_TO_DOWNLOAD kilobytes of the image | |
# Requirements: | |
# * curl |
All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker
. This will install the whole docker suite, left only Tini to be compiled manually.
https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg |