Skip to content

Instantly share code, notes, and snippets.

View creaktive's full-sized avatar
👽
🛸

Stanislaw Pusep creaktive

👽
🛸
View GitHub Profile
@creaktive
creaktive / psy-radio.m3u
Created August 19, 2024 09:29
Psytrance Online Radios
#EXTM3U
#EXTINF: 0, Psyndora Trance
https://cast.magicstreams.gr/sc/psyndora/stream
#EXTINF: 0, Psyndora Chill
https://cast.magicstreams.gr/sc/psychill/stream
#EXTINF: 0, RadiOzora Trance
https://trance.out.airtime.pro/trance_a
@creaktive
creaktive / sfjq.sh
Last active March 28, 2024 20:01
jq <3 SalesForce
alias sfjq='jq '\''if .status==0 then .result.records[]|[paths(scalars) as $p|{"key":$p|join("."),"value":getpath($p)}|select(.key|test("\\battributes\\b")|not)]|from_entries else .message|halt_error(1) end'\'
@creaktive
creaktive / amazon-ip-ranges.pl
Created March 5, 2024 13:14
AWS IP address ranges scanner
#!/usr/bin/env perl
use strict;
use warnings qw(all);
use constant IP_RANGES_JSON => 'https://ip-ranges.amazonaws.com/ip-ranges.json';
use JSON::PP qw();
use LWP::Simple qw();
use NetAddr::IP qw();
@creaktive
creaktive / spilling-bee.sh
Created February 27, 2024 16:38
New York Times Spelling Bee cheat
# scrape the answers from the game
curl -qs 'https://www.nytimes.com/puzzles/spelling-bee' \
--compressed \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:123.0) Gecko/20100101 Firefox/123.0' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' \
-H 'Accept-Language: en-US,en;q=0.5' \
-H 'Accept-Encoding: gzip, deflate, br' \
-H 'Connection: keep-alive' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'Sec-Fetch-Dest: document' \
@creaktive
creaktive / parser.pl
Created May 16, 2023 18:22
iTerm2 color scheme parser
#!/usr/bin/env perl
use 5.036;
local $/ = undef;
$_ = <>;
while (
m{
(?(DEFINE)
(?<float> \d+\.\d+)
@creaktive
creaktive / midi.pl
Created December 3, 2022 14:16
simplest MIDI file writer
#!/usr/bin/env perl
use 5.036;
my $ch = 0;
my $division = 960;
my $note_off = 0x80;
my $note_on = 0x90;
my $track = '';
$track .= pack('wC3', 23, $note_on + $ch, 69, 126);
@creaktive
creaktive / Aggregated-GitHub-traffic-stats.sh
Created November 30, 2022 16:28
Aggregated GitHub traffic stats
gh repo list --limit 999 --no-archived --visibility public --json nameWithOwner --jq '.[] | .nameWithOwner' |\
PAGER= xargs -I% gh api repos/%/traffic/views --jq 'select(.count != 0) | [.count, .uniques, "https://github.com/%"] | join("\t")' |\
sort -nrk2
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"id": "Condition",
"index": 0,
"name": "Condition",
"normalized_value": 0,
"text": "0",
@creaktive
creaktive / keybindings.json
Created May 6, 2022 09:18
VSCode fix for Alt+. in Terminal
[
{
"key": "alt+.",
"command": "workbench.action.terminal.sendSequence",
"args": { "text": "\u001b." }
}
]
@creaktive
creaktive / benchmark.cpp
Created April 1, 2022 10:12
pianolizer benchmark
/*
* wget https://github.com/creaktive/pianolizer/raw/master/cpp/pianolizer.hpp
* g++ -Ofast -std=c++14 -o benchmark benchmark.cpp
*/
#include <chrono>
#include <iostream>
#include <stdlib.h>
#include "pianolizer.hpp"