Skip to content

Instantly share code, notes, and snippets.


Damon Jablons blackrobot

View GitHub Profile
blackrobot / django-example.html
Created Dec 30, 2020
Example of OctoLinker mangling the HTML of a django source file
View django-example.html
<!-- OctoLinker Enabled -->
<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="">
<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;;,&quot;user_id&quot;:85895}}" data-hydro-click-hmac="a987f9b6fad47553f0ed81d9247442e2c673144f316ce4e8b99e506dae4ab0f5">apps</span>
put this in $PROJECT/.tmp/home/.config/ptpython/
from __future__ import unicode_literals
from prompt_toolkit.keys import Keys
from ptpython.layout import CompletionVisualisation

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.


blackrobot / .bashrc
Created Feb 3, 2020
Simplified remote dotfiles
View .bashrc
# shellcheck shell=bash disable=SC2164,SC1117
# ~/.bashrc: executed by bash(1) for non-login shells.
# Note: PS1 and umask are already set in /etc/profile. You should not
# need this unless you want different defaults for root.
# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
# umask 022
export TERM='xterm-256color'
View hourly-rate.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Dockerfile
FROM python:3.7
# Install the dependencies for R
RUN apt-get update && apt-get install -y r-base r-base-dev r-recommended
# Add all of the scripts to the /opt/app/ path inside of the image
ADD . /opt/app/
# Change the working directory inside of the image to /opt/app/
WORKDIR /opt/app/
import time
import requests
MAX_UNICODE = 0x10ffff
def rand_bytes():
resp = requests.get("")
content = resp.content
View main.css
.mp_notification {
position: fixed;
padding: 20px 40px;
width: 100%;
bottom: 0;
left: 0;
background: #333;
color: #bbb;
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.3);
z-index: 99998; }
View brew-fiscript.rb
cask 'fiscript' do
version '1.0.1'
sha256 'a622526479338a151c42f57b04717902555b33aad06abba249c8a4bb0554a0ed'
url ''
name 'FiScript'
homepage ''
depends_on macos: '>= :sierra'