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/env python | |
# | |
# This code is based on | |
# https://github.com/finish06/pyunifi/blob/master/unifi-ls-clients | |
# | |
# 1. Install pyunifi | |
# pip install --user pyunifi | |
# 2. Run this script | |
# unifi-ls-all-clients -c UNIFI_HOST -b UNIFI_PORT -u USER -p PASSWORD -V |
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
// https://gist.github.com/niespodd/1fa82da6f8c901d1c33d2fcbb762947d | |
const fs = require('fs'); | |
const f = 'node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js'; | |
fs.readFile(f, 'utf8', function (err,data) { | |
if (err) { | |
return console.log(err); | |
} | |
var result = data.replace(/node: false/g, 'node: {crypto: true, stream: true, fs: \'empty\'}'); |
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
const N3 = require('n3'); | |
const { DataFactory } = N3; | |
const { namedNode, literal, defaultGraph, quad } = DataFactory; | |
const store = new N3.Store(); | |
const parser = new N3.Parser(); | |
parser.parse( | |
`PREFIX c: <http://example.org/cartoons#> | |
c:Tom a c:Cat. | |
c:Jerry a c:Mouse; |
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
# Install latest su-exec | |
RUN set -ex; \ | |
\ | |
curl -o /usr/local/bin/su-exec.c https://raw.githubusercontent.com/ncopa/su-exec/master/su-exec.c; \ | |
\ | |
fetch_deps='gcc libc-dev'; \ | |
apt-get update; \ | |
apt-get install -y --no-install-recommends $fetch_deps; \ | |
rm -rf /var/lib/apt/lists/*; \ | |
gcc -Wall \ |
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
#!/bin/bash | |
set -e | |
if ! [[ -x "$(command -v curl 2> /dev/null)" ]]; then | |
echo >&2 "No curl command" | |
exit 1 | |
fi | |
if ! [[ -x "$(command -v openssl 2> /dev/null)" ]]; then |
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
THIS_DIR="$(dirname "$(readlink -f "$BASH_SOURCE")")" | |
THIS_DIR=$( (cd "$(dirname -- "$BASH_SOURCE")" && pwd -P) ) | |
THIS_DIR=$(dirname "$( readlink -f "${BASH_SOURCE}" 2>/dev/null || \ | |
python -c "import os,sys; print(os.path.realpath(sys.argv[1]))" "${BASH_SOURCE}" )") |