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
| export function debounce(func: (args: IArguments) => any, wait: number, immediate: boolean) { | |
| let timeout: number | undefined; | |
| return function executedFunction(this: any) { | |
| const context: any = this; | |
| const args = arguments; | |
| const later = () => { | |
| timeout = undefined; | |
| if (!immediate) { |
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 python | |
| # https://news.ycombinator.com/item?id=19078825 | |
| import traceback | |
| import pdb | |
| import sys | |
| def main(): | |
| # some WIP code that maybe raises an exception |
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 | |
| # Source | |
| # https://www.raspberrypi.org/forums/viewtopic.php?t=192291 | |
| # https://raspberrypi.stackexchange.com/questions/66169/auto-mount-usb-stick-on-plug-in-without-uuid | |
| set -e | |
| if [[ $EUID -ne 0 ]]; then |
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 | |
| set -e | |
| # create system users to be run docker apps | |
| # put this file in your /sbin dir and chmod +x it | |
| # this script: | |
| # - create users without pass | |
| # - and them to the docker group |
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 | |
| # MariaDB/MySQL Replication Configuration Script for Ubuntu/Debian | |
| # cauelt@gmail.com 2013-12/2014-09 | |
| set -o errexit -o nounset -o pipefail | |
| ## References | |
| # Percona repositories: |
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 python | |
| # A simple script to suck up HTML, convert any images to inline Base64 | |
| # encoded format and write out the converted file. | |
| # | |
| # Usage: python standalone_html.py <input_file.html> <output_file.html> | |
| # | |
| # TODO: Consider MHTML format: https://en.wikipedia.org/wiki/MHTML | |
| import os | |
| from bs4 import BeautifulSoup |
OlderNewer