Skip to content

Instantly share code, notes, and snippets.

View adoyle-h's full-sized avatar
🎩
Ask Me Good Questions

ADoyle adoyle-h

🎩
Ask Me Good Questions
View GitHub Profile
#
# Automatically generated file; DO NOT EDIT.
# ImmortalWrt Configuration
#
CONFIG_MODULES=y
CONFIG_HAVE_DOT_CONFIG=y
CONFIG_HOST_OS_LINUX=y
# CONFIG_HOST_OS_MACOS is not set
# CONFIG_TARGET_airoha is not set
# CONFIG_TARGET_d1 is not set
@adoyle-h
adoyle-h / CHANGELOG.md
Last active February 23, 2023 21:20
CHANGELOG.md
@adoyle-h
adoyle-h / 1.bash
Created July 11, 2019 10:49
bash nameref FML
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
shopt -s inherit_errexit
[[ -n "${VERBOSE:-}" ]] && set -o verbose
[[ -n "${DEBUG:-}" ]] && IS_DEBUG=true || IS_DEBUG=false
foo() {
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
shopt -s inherit_errexit
declare -a k
echo "IFS=$IFS"
@adoyle-h
adoyle-h / a.bash
Last active October 4, 2021 03:59
"shopt -s inherit_errexit" is important
#!/usr/bin/env bash
set -o errexit
set -o nounset
f() {
echo -n hello
INVALID_COMMAND
echo -n world
}
@adoyle-h
adoyle-h / test.js
Created December 7, 2017 03:58
bad lodash iterations
const _ = require('lodash');
const hasLength = {
length: 4,
a: 1,
b: 2,
};
const normal = {
a: 1,
var vm = require('vm');
function printError(e) {
// console.log(e instanceof Error, e, e.stack);
console.log(e instanceof Error);
}
console.log('====== Example 1 ======');
try {
@adoyle-h
adoyle-h / .gitconfig
Created June 5, 2016 11:50
.gitconfig
[user]
name = ADoyle
email = [email protected]
[color]
ui = true
[core]
editor = nvim
excludesfile = ~/.gitignore
autocrlf = input
safecrlf = true
var http = require('http');
var targetUrl = 'https://www.douban.com/';
var body = '<html>'
+ '<head></head>'
+ '<body>'
+ '<form action="' + targetUrl + '" method="POST">'
+ '<input type="text" name="hello" value="world"/>'
+ '</form>'
@adoyle-h
adoyle-h / npm-registry-licenses.txt
Created December 19, 2015 12:14 — forked from robertkowalski/npm-registry-licenses.txt
The licenses in the npm-registry from their package.json, from the latest version of each module 23.11.2013
The licenses in the npm-registry from their package.json, from the latest version of each module
23.11.2013
[ { key: 'undefined', value: 27785 },
{ key: 'MIT', value: 20811 },
{ key: 'BSD', value: 5240 },
{ key: 'BSD-2-Clause', value: 621 },
{ key: 'Apache 2.0', value: 263 },
{ key: 'GPL', value: 233 },