Skip to content

Instantly share code, notes, and snippets.

View blackrobot's full-sized avatar
🖖
coffee

Damon Jablons blackrobot

🖖
coffee
View GitHub Profile
@m1yag1
m1yag1 / migrate_zenhub_issues.py
Last active February 14, 2023 18:27
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 / .bashrc
Created February 3, 2020 17:36
Simplified remote dotfiles
# 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'
class Chromaprint < Formula
# Revert chromaprint changes to prevent ffmpeg circular dependency
# https://github.com/Homebrew/homebrew-core/pull/46684
# https://github.com/homebrew-ffmpeg/homebrew-ffmpeg/issues/13
desc "Core component of the AcoustID project (Audio fingerprinting)"
homepage "https://acoustid.org/chromaprint"
url "https://github.com/acoustid/chromaprint/releases/download/v1.4.3/chromaprint-1.4.3.tar.gz"
sha256 "ea18608b76fb88e0203b7d3e1833fb125ce9bb61efe22c6e169a50c52c457f82"
@ruddra
ruddra / Docker with Django, Numpy, Scipy, Gensim and Pandas
Last active March 11, 2022 23:38
Docker with Django, Numpy, Scipy, Gensim and Pandas
# pull official python alpine image
FROM python:3.7-alpine
# Set Environment Variable
ENV PYTHONUNBUFFERED 1
ENV C_FORCE_ROOT true
# Making source and static directory
RUN mkdir /src
RUN mkdir /static
@koop
koop / ensure-cert-macos.sh
Created November 28, 2017 20:27
Ensures a certificate is in the macOS system keychain.
#!/bin/bash
# Usage
# $ ./install-cert-macos.sh "/path/to/cert"
CERT_PATH="$1"
# First, grab the SHA-1 from the provided SSL cert.
CERT_SHA1=$(openssl x509 -in "$CERT_PATH" -sha1 -noout -fingerprint | cut -d "=" -f2 | sed "s/://g")
# Next, grab the SHA-1s of any standard.dev certs in the keychain.
# Don't return an error code if nothing is found.
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active May 1, 2024 16:04
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@veuncent
veuncent / docker_debugging.md
Last active February 21, 2024 00:58
Debugging Django apps running in Docker using ptvsd - Visual Studio (Code)

Remote debugging in Docker (for Django apps)

In order to enable debugging for your Django app running in a Docker container, follow these steps using Visual Studio (Code):

  1. Add ptvsd to your requirements.txt file
ptvsd == 4.3.2
  1. To your launch.json, add this:
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 1, 2024 17:49
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@blueyed
blueyed / test_django_data_migration.py
Last active December 9, 2020 16:20
Test Django data migrations
"""
Test (data) migrations in Django.
This uses py.test/pytest-django (the `transactional_db` fixture comes from there),
but could be easily adopted for Django's testrunner:
from django.test.testcases import TransactionTestCase
class FooTestcase(TransactionTestCase):
def test_with_django(self):
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)