Skip to content

Instantly share code, notes, and snippets.

View jrjhealey's full-sized avatar

Joe Healey jrjhealey

View GitHub Profile
@jeromekelleher
jeromekelleher / animate_edges.py
Created April 13, 2019 17:18
Animate trees evolving along a tree sequence
import pathlib
import subprocess
import msprime
def draw_partial_tree(tables, edges, filename):
tables.edges.clear()
for edge in edges:
tables.edges.add_row(*edge)
@jaimergp
jaimergp / pychimera_screenshots.py
Created September 8, 2016 17:48
Headless render images of molecules with PyChimera
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import pychimera
import os
# os.environ['CHIMERADIR'] = '/path/to/headless/chimera'
pychimera.patch_environ()
pychimera.enable_chimera()
# see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/
# core
brew install coreutils
# key commands
brew install binutils
brew install diffutils
brew install ed --default-names
brew install findutils --with-default-names
@seanlinsley
seanlinsley / seeyouspacecowboy.rb
Last active August 30, 2020 23:46
A Ruby verison, because the ANSI colors weren't showing up on logout in the Shell version this is forked from
#!/usr/bin/env ruby
# SEE YOU SPACE COWBOY by DANIEL REHN (danielrehn.com)
# Displays a timeless message in your terminal with cosmic color effects
# Usage: add `ruby ~/seeyouspacecowboy.rb; sleep 2` to .bash_logout (or similar) in your home directory
# (adjust the sleep variable to display the message for more seconds)
class String
def colorize(color_code)
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@jaimergp
jaimergp / config-highlight.cfg
Last active July 28, 2023 14:39
Dark highlighting theme for Python IDLE based on SublimeText's Monokai color scheme
# Place this file inside your ~/.idlerc/ folder
# or paste its contents inside
# /path/to/python/idlelib/config-highlight.def
# Adapted from SublimeText's Monokai
[monokai]
normal-foreground= #F8F8F2
normal-background= #272822
keyword-foreground= #F92672
keyword-background= #272822
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active April 2, 2024 15:59
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@sublee
sublee / README.rst
Created September 28, 2010 08:03
Finger Binary ASCII art generator for Python

Finger Binary

What's Finger Binary?

Here is a description of Finger Binary in Wikipedia.

Finger binary is a system for counting and displaying binary numbers on the