Skip to content

Instantly share code, notes, and snippets.

@RickCogley
RickCogley / create-github-issue.sh
Last active May 13, 2024 08:23
Curl Script to Create a Github Issue
curl -X "POST" "https://api.github.com/repos/rickcogley/REPONAME/issues?state=all" \
-H "Cookie: logged_in=no" \
-H "Authorization: token THEd13GITHUBfb87TOKENa4FROM5eSETTINGS" \
-H "Content-Type: text/plain; charset=utf-8" \
-d $'{
"title": "A workflow alerts Operator who performs a process",
"body": "TBD",
"milestone": 5,
"assignees": [
"RickCogley",
@jfsiii
jfsiii / relativeLuminanceW3C.js
Last active May 13, 2024 08:23
Calculate the relative luminance, or brightness, of a color. Accepts values 0-255 for R, G, B.
// from http://www.w3.org/TR/WCAG20/#relativeluminancedef
function relativeLuminanceW3C(R8bit, G8bit, B8bit) {
var RsRGB = R8bit/255;
var GsRGB = G8bit/255;
var BsRGB = B8bit/255;
var R = (RsRGB <= 0.03928) ? RsRGB/12.92 : Math.pow((RsRGB+0.055)/1.055, 2.4);
var G = (GsRGB <= 0.03928) ? GsRGB/12.92 : Math.pow((GsRGB+0.055)/1.055, 2.4);
var B = (BsRGB <= 0.03928) ? BsRGB/12.92 : Math.pow((BsRGB+0.055)/1.055, 2.4);
@rponte
rponte / using-uuid-as-pk.md
Last active May 13, 2024 08:21
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes

@httpsx
httpsx / WireGuard DPI обход РКН - Windows.md
Last active May 13, 2024 08:21
WireGuard DPI обход РКН - Windows

Для обхода блокировки достаточно отправить 1 любой udp пакет, тем самым нарушим начальное определение протокола WireGuard
Способ с использованием Windows PowerShell. Без скачивания Nmap и подобного софта.

Шаг 0: Отключитесь от всех туннелей.

Шаг 1: Редактируем Клиент конфиг

Добавим в него "ListenPort", это позволит иметь статичный порт на котором будет работать WireGuard
Нажмите ПКМ на нужный "туннель" и выберите "Редактировать выбранный туннель..." Step1

После DNS добавляем новую строку

@zengxinhui
zengxinhui / convert2arch_x64.sh
Last active May 13, 2024 08:18
Replace Oracle Cloud Linux with Arch Linux remotely
[09/23/2023]
Refs:
1. http://mirror.cs.pitt.edu/archlinux/iso/2023.09.01/archlinux-bootstrap-2023.09.01-x86_64.tar.gz
2. https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-virt-3.18.0-x86_64.iso
3. https://wiki.alpinelinux.org/wiki/Replacing_non-Alpine_Linux_with_Alpine_remotely
4. https://wiki.archlinux.org/index.php/installation_guide#Configure_the_system
See also:
1. Convert to Debian https://gist.github.com/zengxinhui/ee0ad6b7c7f99e2ead6cd0d2bd6641fd
@alojzije
alojzije / connectHTMLelements_SVG.png
Last active May 13, 2024 08:16
Connect two elements / draw a path between two elements with SVG path (using jQuery)
connectHTMLelements_SVG.png
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active May 13, 2024 08:15
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@rjescobar
rjescobar / extend-trial-jetbrains-windows.bat
Created August 31, 2021 02:53
JetBrains IDE trial reset windows
REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"
@vasanthk
vasanthk / System Design.md
Last active May 13, 2024 08:15
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@rxaviers
rxaviers / gist:7360908
Last active May 13, 2024 08:14
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: