Skip to content

Instantly share code, notes, and snippets.

View github-actions-free-web-analytics.js
function logAnalytics() {
// GITHUB ACTIONS FREE ANALYTICS
// create a github personal token and insert it here
// ONLY give it actions:write permissions on a SINGLE repo, which is bad, but not, I think, extra extra bad
const githubPat = "github_pat_INSERT_YOUR_PERSONAL_TOKEN_HERE";
// this is YOUR repo where you'd want your log files
const githubRepo = "gregsadetsky/github-actions-free-analytics";
const githubApiVersion = "2022-11-28";
// replace this with the ID of your workflow -- I use `gh workflow list` i.e. the GitHub CLI tool to find the ID
@gregsadetsky
gregsadetsky / render.1m.py
Last active November 8, 2023 16:40
plugin for xbar which shows the latest deployment status for your services hosted on render.com in your menubar
View render.1m.py
#!/opt/homebrew/bin/python3
# canonical source for this script:
# https://gist.github.com/gregsadetsky/7e4f040989d7792c3191316174409670
"""
this is a script that is meant to be run by xbar i.e.
https://github.com/matryer/xbar
a utility that places any command line output into a macOS menu bar
View DIY rcmd rapid application launcher.md
  1. install karabiner-elements
  2. give karabiner all necessary security permissions
  3. create a file named ~/.config/karabiner/assets/complex_modifications/1683568839.json
  4. paste the json content below into this file
  5. in karabiner, navigate to complex modifications, click '+ Add rule' -- you should see 4 rules. click Enable All to add them
  6. you should be able to type right-command-key + T to open the terminal, + C to open chrome, + S to open sublime and + F to open the Finder
  7. edit the json file if necessary. delete and re-add the rule so that it refreshes (is this necessary?)

View matrix-trailer-red-1440-minute-urls.txt
As noted by @murdats below, there are more URLs than just these 1440 ones, depending on the argument values
that are hashed (as the filenames below are MD5 hashes of a few arguments: red/blue pill color, HHMM time, etc.)
You can read details about the algorithm used to generate these URLs here:
https://news.ycombinator.com/item?id=28448335
---
00:00 https://thechoiceisyours.whatisthematrix.com/generated/v7/high/d43725991d28ffcab04aa716762cf6af.mp4
View annoy_segfault_values.txt
834630;1. 0. 0. 0. 0. 0. 0. 1. 0. 0.
834631;0. 0. 0. 0. 0. 0. 0. 1. 0. 0.
844954;0. 0. 0. 0. 0. 0. 1. 0. 0. 0.
863987;3. 0. 0. 0. 0. 0. 3. 0. 0. 0.
897324;1. 0. 0. 0. 0. 0. 0. 0. 0. 0.
913856;1. 0. 1. 0. 0. 1. 0. 0. 0. 0.
918094;1. 0. 0. 0. 0. 0. 1. 0. 0. 0.
927050;1. 0. 0. 0. 0. 0. 0. 1. 0. 0.
927051;0. 0. 0. 0. 0. 0. 1. 0. 0. 0.
928011;1. 0. 0. 0. 0. 0. 1. 0. 0. 0.
@gregsadetsky
gregsadetsky / settings.py
Last active May 28, 2021 18:37
See: http://stackoverflow.com/questions/13705328/ -- I was looking for a way to run Selenium tests for a Django app on a staging server hosted on Heroku using a PostgreSQL database. The DjangoTestSuiteRunner creates and destroys the whole database before/after testing, which would not work on Heroku where databases are added via other means (her…
View settings.py
import dj_database_url
TEST_DATABASES = {
'default': dj_database_url.config(env='TEST_DATABASE_URL')
}
# replace path below to point to HerokuTestSuiteRunner class
TEST_RUNNER = 'python.path.to.test_suite_runner.HerokuTestSuiteRunner'