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
var drawnItems = [{"type":"polygon","latLngs":[{"lat":0,"lng":0},{"lat":0,"lng":60},{"lat":30,"lng":30}],"color":"#a24ac3"}]; | |
drawnItems = drawnItems.map(o => o.type !== "polygon" ? o : { ...o, type: "polyline", latLngs: [...o.latLngs, o.latLngs[0]] }); | |
copy(JSON.stringify(drawnItems)); |
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/sh | |
if [ "$(id -u -n)" != "root" ]; then | |
echo "You need to run this script as root" | |
exit 1 | |
fi | |
WG_PRIVKEY= | |
WG_PUBKEY= |
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 python3 | |
import json | |
import sys | |
if len(sys.argv) == 1: | |
print(f'Usage: {sys.argv[0]} result.json > result.txt') | |
sys.exit(1) | |
with open(sys.argv[1], 'r') as f: | |
data = json.load(f) |
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 last_history_item | |
echo $history[1] | |
end | |
abbr -a !! --position anywhere --function last_history_item | |
function ip | |
command ip --color=auto $argv | |
end | |
set -x CC clang |
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
<?xml version='1.0'?> | |
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> | |
<fontconfig> | |
<alias binding="strong"> | |
<family>serif</family> | |
<prefer> | |
<family>Noto Serif</family> | |
<family>Noto Serif CJK SC</family> | |
</prefer> | |
</alias> |
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
-- Ignore this file. | |
-- https://stackoverflow.com/questions/19896900/how-to-change-the-name-of-a-gist-in-github/19904644#19904644 | |
-- https://stackoverflow.com/questions/17665267/how-do-you-control-the-order-in-which-files-appear-in-a-github-gist/17668995#17668995 |