Skip to content

Instantly share code, notes, and snippets.

@Frankz
Frankz / .tmux.conf
Created February 12, 2018 07:40 — forked from Neo-Oli/.tmux.conf
Tmux settings for termux
set-option -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
# Resize panes with arrow keys because alt-arrow keys doesn't work
bind-key -r Up resize-pane -U
bind-key -r Down resize-pane -D
bind-key -r Left resize-pane -L
bind-key -r Right resize-pane -R
@Frankz
Frankz / backup_restore.bash
Created April 13, 2018 21:01 — forked from mark-rushakoff/backup_restore.bash
Backup and restore influxdb inside Docker
#!/bin/bash
set -e
# Default working directory to current directory, but allow override via WORKDIR environment variable.
WORKDIR=${WORKDIR:-$PWD}
NOW="$(date +%s)"
INFLUXDIR="$WORKDIR/influxdb-$NOW"
BACKUPDIR="$WORKDIR/backup-$NOW"
@Frankz
Frankz / README.MD
Created May 3, 2018 14:45 — forked from RichardBronosky/README.MD
Unify the copy and paste commands into one intelligent chainable command.

cb

A leak-proof tee to the clipboard

This script is modeled after tee (see [man tee][2]).

It's like your normal copy and paste commands, but unified and able to sense when you want it to be chainable

Examples

@Frankz
Frankz / typeofvar.sh
Created August 14, 2018 12:02 — forked from CMCDragonkai/typeofvar.sh
Bash: Get the type of a variable
#!/usr/bin/env bash
typeofvar () {
local type_signature=$(declare -p "$1" 2>/dev/null)
if [[ "$type_signature" =~ "declare --" ]]; then
printf "string"
elif [[ "$type_signature" =~ "declare -a" ]]; then
printf "array"
@Frankz
Frankz / pastebin.sh
Created August 16, 2018 18:31 — forked from ktmud/pastebin.sh
Pastebin Bash Script.
#!/bin/bash
# Paste at Pastebin.com using command line (browsers are slow, right?)
# coder : Anil Dewani
# date : Novemeber 7, 2010
#help function
howto()
{
echo "\
Pastebin.com Bash Script \
#!/usr/bin/env bash
# Sometimes Windows presents this issue https://answers.microsoft.com/en-us/windows/forum/windows_10-files-winpc/windows-10-file-explorer-windows-dont-refresh/32e5292b-333d-4b7c-a099-549831aa9339
# This is a git-bash script for add to .bash_profile and have at hand this tool
# More about DISM - https://docs.microsoft.com/en-us/windows/desktop/win7appqual/dism-replaces-pkgmgr-peimg-and-intlconfg-tools
function fixRefresh() {
DISM.exe -Online -Cleanup-image -Restorehealth; if [[ $? > 0 ]]; then echo "FAIL - DISM Restorehealth, trying now with DISM StartComponentCleanup"; Dism.exe -online -Cleanup-Image -StartComponentCleanup; fi
}
@Frankz
Frankz / howto-build-icinga2-debian-ubuntu-packages.md
Last active October 21, 2018 03:00 — forked from andrenarchy/howto.md
Build icinga2 and icinga-web Debian/Ubuntu packages for non-{i386,amd64} architectures

Build icinga2 and icinga-web Debian/Ubuntu packages for non-{i386,amd64} architectures

Why?

The icinga PPA only provides packages for i386 and amd64. If you're running an ARM-powered device such as the Raspberry Pi or the ODROID U3 (which I use), you have to build the packages yourself. However, compiling the packages is very easy thanks to Debian's excellent build tools and the work of the icinga package maintainer. This howto uses pbuilder which builds in a clean chroot so your original system is not polluted with build packages.

@Frankz
Frankz / RestApiTest.ps1
Created November 12, 2018 19:51 — forked from bryan-c-oconnell/RestApiTest.ps1
bryanoconnell.blogspot.com - Test your RESTful API using PowerShell
# |Info|
# Written by Bryan O'Connell, November 2014
# Purpose: Sample of a functional test script for a RESTful API.
#
# Thanks to contributors on the 'jsonplaceholder' project for making a publicly
# accesible and generic REST API (which is used in the examples below).
# - http://jsonplaceholder.typicode.com
# - https://github.com/typicode/jsonplaceholder
#
# |Info|
@Frankz
Frankz / GeneratingSSHkeys.md
Created February 5, 2019 12:22
Generating SSH keys

Generating SSH keys

SSH keys are a way to identify trusted computers, without involving passwords. The steps below will walk you through generating an SSH key and adding the public key to your GitHub account.

We recommend that you regularly review your SSH keys list and revoke any that haven't been used in a while.

Tip: If you have GitHub for Windows installed, you can use it to clone repositories and not deal with SSH keys. It also comes with the Git Bash tool, which is the preferred way of running git commands on Windows.

Step 1: Check for SSH keys

{
"tarifa": [{
"resolucion":"Resolución ENRE Nº 25/2019",
"vigencia": "01/02/2019",
"tarifa": "T1-R1",
"compania": "Edenor",
"concepto_uso": "Residencial",
"concepto_consumo": "Mensual inferior o igual a 150 kWh",
"concepto_cargo":"Fijo",
"unidad": "$/mes",