Skip to content

Instantly share code, notes, and snippets.

@sgur
sgur / .dircolors.wsl
Last active February 11, 2022 15:21
Dircolors for WSL
# dircolors for WSL
# Usage: eval `dircolors ~/.dircolors.wsl` (bash)
# http://www.bigsoft.co.uk/blog/index.php/2008/04/11/configuring-ls_colors
TERM Eterm
TERM ansi
TERM color-xterm
TERM con[0-9]*x[0-9]*
TERM cons25
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 26, 2024 17:59
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@joshbode
joshbode / LICENSE.md
Last active April 5, 2024 14:52
YAML Loader with include constructor (Python 3)

MIT License

Copyright (c) 2018 Josh Bode

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@sloria
sloria / bobp-python.md
Last active May 1, 2024 08:37
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@rmcgibbo
rmcgibbo / openmm.md
Last active March 6, 2017 16:46
OpenMM binary prototype

OpenMM command line script prototype.

This is basically a port of the webapp. It doesn't (yet) include some of the features that Lee-Ping has implemented, like saving restart files and adding new reporters. If we want to include those things with the openmm app, they should probably go in the library anyways.

Here's what it looks like running. Python code showing its interaction with the OpenMM API is printed out in real-time, as it's executed. There are some log messages too.

rmcgibbo@vspm9  ~/local/openmm_build/python
$ openmm --coords=~/local/openmm_tests/input.pdb
@SteveRyherd
SteveRyherd / config
Created June 26, 2013 01:15
Terminator config file includes monokai theme and copy/paste shortcuts enabled.
[global_config]
title_transmit_bg_color = "#4c4c4c"
title_inactive_fg_color = "#afafaf"
title_inactive_bg_color = "#2d2d2d"
[keybindings]
copy = <Primary>c
paste = <Primary>v
[profiles]
[[default]]
palette = "#000000:#f92672:#6cc72c:#fe9720:#5f91ef:#9358fe:#36af90:#8c8c8c:#4c4c4c:#ff80f4:#a7e22e:#ffee99:#5fd9ef:#ae82fe:#66efd5:#c7cece"
@ajdavis
ajdavis / b64ify.py
Created June 8, 2013 17:33
Python 2/3-compatible base64 encoding?
import base64
import sys
import unittest
PY3 = sys.version_info[0] >= 3
def base64ify(bytes_or_str):
if PY3 and isinstance(bytes_or_str, str):
input_bytes = bytes_or_str.encode('utf8')