Skip to content

Instantly share code, notes, and snippets.

View blackrobot's full-sized avatar
🖖
coffee

Damon Jablons blackrobot

🖖
coffee
View GitHub Profile
@blackrobot
blackrobot / chrome-flags.md
Created December 13, 2017 00:17
Google Chrome Flags
@blackrobot
blackrobot / duckduckgo.js
Last active December 4, 2023 01:42
Preference settings for duckduckgo.com / duck.com
/**
* Duck Duck Go Settings
* https://duckduckgo.com/params
**/
{
// Result Settings
"kl": "us-en", // Language & Region
"kp": "-2", // Safe Search: Off
"kz": "1", // Open Instant answers: On
@blackrobot
blackrobot / fix-zenhub-csv.py
Created March 3, 2023 19:04
Remove broken quoting in CSV exports from ZenHub
#!/usr/bin/env python3
"""
Read a CSV file from stdin and write a fixed CSV file to stdout.
Example:
$ cat zenhub.csv | ./fix-zenhub-csv.py > fixed.csv
$ fix-zenhub-csv.py zenhub.csv > fixed.csv
"""
@blackrobot
blackrobot / migrate_zenhub_issues.py
Created February 14, 2023 18:27 — forked from m1yag1/migrate_zenhub_issues.py
Migrate Issues from ZenHub to GH Projects
# We first create a spreadsheet with the ZenHub Pipeline and GitHub Project Column mapping
# Then, we moved all the issues manually into an "Unsorted" column in our GitHub Project
# Read through each of the issues that is in the Unsorted column and move them to the correct column
# if it's in the spreadsheet.
# To run:
# pip install python-dotenv ghzh-clients
import csv
import os
@blackrobot
blackrobot / devdocs.json
Last active December 27, 2021 20:02
preferences from devdocs.io
{
"analyticsConsentAsked": "1",
"analyticsConsent": "1",
"autoInstall": "1",
"docs": "css/html/http/javascript/dom/bootstrap~5/django~4.0/django_rest_framework/docker~19/git/nginx/pandas~1/postgresql~14/postgresql~11/python~3.10/react/redis/redux/redux~3/typescript/webpack~5/werkzeug~2.0",
"tips": "KeyNav",
"theme": "auto"
}
"""
Here's my sample Django settings for a project I recently did. Visit http://damonjablons.wordpress.com to see the explanation.
"""
import os
import socket
# Set DEBUG = True if on the production server
if socket.gethostname() == 'your.domain.com':
DEBUG = False
@blackrobot
blackrobot / django-example.html
Created December 30, 2020 22:37
Example of OctoLinker mangling the HTML of a django source file
<!-- OctoLinker Enabled -->
<tr>
<td id="L4" class="blob-num js-line-number" data-line-number="4"></td>
<td id="LC4" class="blob-code blob-code-inner js-file-line highlighted">
<span class="pl-k">from</span>
<a data-pjax="true" class="octolinker-link" href="https://www.djangoproject.com">
<span class="pl-s1">django</span>.
<span class="pl-s1">apps</span>
<span class="pl-s1">
<span class="pl-token" data-hydro-click="{&quot;event_type&quot;:&quot;code_navigation.click_on_symbol&quot;,&quot;payload&quot;:{&quot;action&quot;:&quot;click_on_symbol&quot;,&quot;repository_id&quot;:4164482,&quot;ref&quot;:&quot;a9a7421ab83361746549d574ca13438ba93c95fe&quot;,&quot;language&quot;:&quot;Python&quot;,&quot;originating_url&quot;:&quot;https://github.com/django/django/blob/a9a7421ab83361746549d574ca13438ba93c95fe/django/contrib/auth/checks.py&quot;,&quot;user_id&quot;:85895}}" data-hydro-click-hmac="a987f9b6fad47553f0ed81d9247442e2c673144f316ce4e8b99e506dae4ab0f5">apps</span>
'''
put this in $PROJECT/.tmp/home/.config/ptpython/config.py
'''
from __future__ import unicode_literals
from prompt_toolkit.keys import Keys
from ptpython.layout import CompletionVisualisation
@blackrobot
blackrobot / 01-readme.md
Created April 22, 2020 16:16
Debugging info for lichess.org Stockfish WASM error

Redirect To File Download

To use this, replace all of the placeholder content in 01.template.html with the actual file path and name.

Then save the resulting html file as index.html to be used as the S3 bucket index as well as the error page for redirects.

Example