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
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat" | |
set PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\Llvm\bin | |
llvm-rc.exe helloworld.rc | |
clang.exe -Oz -Wall -Wextra -falign-functions=1 -falign-loops=1 -flto -fno-asynchronous-unwind-tables -fno-ident -fno-stack-protector -fno-unwind-tables -fuse-ld=lld -mwindows helloworld.c helloworld.res -o helloworld.exe -nostdlib -Wl,/SUBSYSTEM:WINDOWS,/ALIGN:16,/FILEALIGN:16 -lcomctl32 -lkernel32 -luser32 |
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 colour | |
import numpy | |
import readline | |
def convert(XYZ100): | |
XYZ100 = numpy.asarray(XYZ100) | |
XYZ1 = XYZ100 * 0.01 | |
D50 = colour.CCS_ILLUMINANTS['CIE 1931 2 Degree Standard Observer']['ICC D50'] |
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 itertools | |
import os | |
import unicodedata | |
# pip3 install -U PyYAML | |
import yaml | |
# Windows disallows the following characters in filenames: "*/:<>?\| |
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 library is licensed under WTFPL version 2. | |
* | |
* May contain undiscovered bugs. | |
* I am willing to fix bugs but will not be responsible for them. | |
* | |
* I suggest you cross-check with another library, for example: | |
* https://github.com/RRZE-HPC/pycachesim | |
*/ |
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 | |
# Convert a pixel art to SVG file | |
# Copyright (C) 2021 Star Brilliant | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
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 netaddr | |
def main(): | |
# Download from https://api.steampowered.com/ISteamApps/GetSDRConfig/v1?appid=730 | |
with open('network_config.json', 'r', encoding='utf-8') as f: | |
network_config = 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
#!/usr/bin/env python3 | |
# Copyright (C) 2020 Star Brilliant <coder@poorlab.com> | |
# | |
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | |
# | |
# 0. You just DO WHAT THE FUCK YOU WANT TO. | |
import sys |
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 bash | |
networksetup -listallnetworkservices | tail +2 | | |
while read NETWORK_SERVICE | |
do | |
echo 'Network service: '$'\e[34m'"$NETWORK_SERVICE"$'\e[0m' | |
networksetup -getproxyautodiscovery "$NETWORK_SERVICE" | sed 's/^/[WPAD] /' | |
networksetup -getautoproxyurl "$NETWORK_SERVICE" | sed 's/^/[PAC] /' | |
networksetup -getwebproxy "$NETWORK_SERVICE" | sed 's/^/[HTTP] /' | |
networksetup -getsecurewebproxy "$NETWORK_SERVICE" | sed 's/^/[HTTPS] /' |
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
adb shell settings put global captive_portal_https_url https://connect.rom.miui.com/generate_204 | |
adb shell settings put global captive_portal_http_url http://connect.rom.miui.com/generate_204 |
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/gjs | |
const GObject = imports.gi.GObject; | |
const Gdk = imports.gi.Gdk; | |
const Gtk = imports.gi.Gtk; | |
const Lang = imports.lang; | |
const MouseTest = new Lang.Class({ | |
Name: "Mouse Test", |
NewerOlder