Saved from http://mywiki.wooledge.org/BashPitfalls?utm_source=DigitalOcean_Newsletter
This file contains 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
function rot13(str) { // LBH QVQ VG! | |
var re = new RegExp("[a-z]", "i"); | |
var min = 'A'.charCodeAt(0); | |
var max = 'Z'.charCodeAt(0); | |
var factor = 13; | |
var result = ""; | |
str = str.toUpperCase(); | |
for (var i=0; i<str.length; i++) { | |
result += (re.test(str[i]) ? |
This file contains 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
# dsoares | |
.PHONY: help map.html clear | |
default: map.html | |
## help : Print commands help. | |
help: Makefile | |
@sed -n 's/^##//p' $< | |
## map.html : Generate map.html |
This file contains 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/python3 | |
# Copyright 2021 Tobias Girstmair (https://gir.st). Consider this code GPLv3 | |
# licensed. | |
# pip3 install flynn base45 PyPDF2 pyzbar Pillow | |
# dnf install zbar || apt install libzbar0 | |
import sys | |
import glob |
Read about How to install LXC\LXD on Ubuntu: https://linuxcontainers.org/lxd/getting-started-cli/
On LXC\LXD Host Mashine create a containe with Ubuntu 18.04 with name "eset"
lxc launch images:ubuntu/18.04 eset
This file contains 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
# Your snippets | |
# | |
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
# expand the prefix into a larger code block with templated values. | |
# | |
# You can create a new snippet in this file by typing "snip" and then hitting | |
# tab. | |
# | |
# An example CoffeeScript snippet to expand log to console.log: | |
# |
This file contains 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
/* global createImageBitmap */ | |
function loadImageWithImageTag(src) { | |
return new Promise((resolve, reject) => { | |
const img = new Image; | |
img.crossOrigin = ''; | |
img.src = src; | |
img.onload = () => { resolve(img); }; | |
img.onerror = () => { reject(img); }; | |
}); |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>WebWorker image preloading</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" /> | |
</head> | |
<body> | |
<div id="output"></div> | |
<script id="imgloader" type="javascript/worker"> | |
// Not race proof or robust. Proof of concept. |
This document is based on this instructions: Installing AMC development version on macOS
UPDATE 2018-03-15
Comments were added to this gist with a method to install AMC with Homebrew. To choose your best installation option, please read them before installation.
NewerOlder