THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
#!/bin/bash | |
loopdevice=/dev/loop0 | |
loopfile=crypt.loop | |
#megabytes | |
loopsize=256 | |
#/dev/mapper/xxxxx when open | |
cryptmapper=myCrypt |
btauth --user USER_OR_EMAIL --pass PASSWORD # To Authenticate with the BT WiFi
btmaintain --user USER_OR_EMAIL --pass PASSWORD # To maintain a connection and re-authenticate automatically
nohup btmaintain --user USER_OR_EMAIL --pass PASSWORD 2>&1 >/dev/null & # Same as above but ran in background
# -*- coding: utf-8 -*- | |
import requests | |
from io import BytesIO, SEEK_SET, SEEK_END | |
class ResponseStream(object): | |
def __init__(self, request_iterator): | |
self._bytes = BytesIO() | |
self._iterator = request_iterator |
[ Update 2020-05-31: I won't be maintaining this page or responding to comments anymore (except for perhaps a few exceptional occasions). ]
Most of the terminal emulators auto-detect when a URL appears onscreen and allow to conveniently open them (e.g. via Ctrl+click or Cmd+click, or the right click menu).
It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages.
#!/usr/bin/env python | |
# This requires Python 2.7. This will not work with Python 3 | |
USERNAME = '[email protected]' | |
PASSWORD = 'Your ovo Password' | |
from requests import Request, Session | |
import json | |
import time |
# Ansible 'lineinfile' like function in Shell Script. | |
# Works on both Bash and Zsh. | |
function lineinfile(){ | |
if [[ $# != 3 ]];then | |
local THIS_FUNC_NAME="${funcstack[1]-}${FUNCNAME[0]-}" | |
echo "$THIS_FUNC_NAME - 3 arguments are expected. given $#. args=[$@]" >&2 | |
echo "usage: $THIS_FUNC_NAME PATTERN LINE FILE" >&2 | |
return 1 | |
fi |
#!/usr/bin/env python | |
import os, os.path, stat, sys, base64 | |
# TOTP lib inlined | |
import time, hmac, base64, hashlib, struct | |
def pack_counter(t): | |
return struct.pack(">Q", t) |
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
If you're self-hosting your services and having trouble getting your emails through Gmail and infuriated by Google's non-existent support, you're not the only one. I'd like to share my experiences trying to get it sorted out.
I'm the author of the post above. You can tell how arrogant Google employees are from all the previous posts he made in the past.