Skip to content

Instantly share code, notes, and snippets.

View Jawabiscuit's full-sized avatar
👾

Jonas Avrin Jawabiscuit

👾
  • Greater NYC Metropolitan
View GitHub Profile
@Jawabiscuit
Jawabiscuit / Python Descriptors Demystified
Created August 4, 2014 14:28
Python Descriptors Demystified By [Chris Beaumont](http://chrisbeaumont.org)
{
"metadata": {
"name": "",
"signature": "sha256:9b2e3ef367b045411ec5d029dd8005a7261fbcbab852815bd3ffcc35f18220c7"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"metadata": {
"name": "",
"signature": "sha256:6589f7bd75bdbe1836ad76975165694574849089fc174c676910b9778751f757"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@Jawabiscuit
Jawabiscuit / Python 3(->2) Metaprogramming
Last active August 29, 2015 14:04
PyCon 2013 discussion by David Beazley techniques converted to work with Python 2. There are only a few idioms that Python 3 uses that David goes over. Nothing that you can't do in 2 really.
{
"metadata": {
"name": "python3-metaprogramming"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@Jawabiscuit
Jawabiscuit / XKCD_plots
Created August 7, 2014 03:13
XKCD_plots
{
"metadata": {
"name": "XKCD_plots"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@Jawabiscuit
Jawabiscuit / Keybase proof
Created August 19, 2014 16:14
Keybase proof
### Keybase proof
I hereby claim:
* I am jawabiscuit on github.
* I am jawabiscuit (https://keybase.io/jawabiscuit) on keybase.
* I have a public key whose fingerprint is E7A2 3AE6 7E10 3DA1 1C41 203C EB80 9DBF 925F 1F7C
To claim this, I am signing this object:
@Jawabiscuit
Jawabiscuit / power-shell-output-encoding.md
Last active August 23, 2017 00:27
LookupError: unknown encoding: cp65001

solution thread

Cause

conda update anaconda

Symptom

PS C:\Users\Jonas> conda install virtualenv
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@Jawabiscuit
Jawabiscuit / .pystartup
Created January 12, 2018 15:42
Add auto-completion and a stored history file of commands to your Python interactive interpreter.
# Add auto-completion and a stored history file of commands to your Python
# interactive interpreter. Requires Python 2.0+, readline. Autocomplete is
# bound to the Esc key by default (you can change it - see readline docs).
#
# Store the file in ~/.pystartup, and set an environment variable to point
# to it: "export PYTHONSTARTUP=/home/user/.pystartup" in bash.
#
# Note that PYTHONSTARTUP does *not* expand "~", so you have to put in the
# full path to your home directory.
@Jawabiscuit
Jawabiscuit / cygwinlist.md
Created December 24, 2020 19:55 — forked from erikvip/cygwinlist.md
Import/Export Cygwin List of installed packages

Import & Export Cygwin List of installed Packages

If you want to go from 32 to 64 bit Cygwin but keep all the packages[1], you might find yourself in a spot where you would like to export the list of cygwin packages and also be able to install cygwin with all these packages again. I will tell you how. Open your Cygwin shell and enter

cygcheck -c -d | sed -e "1,2d" -e 's/ .*\$//' > packagelist

This will simply dump a list of installed packages. To install Cygwin 64 with these packages selected, download setup-x86_64[2] and execute it with the command line parameters

./setup-x86_64 -P `awk 'NR==1{printf \$1}{printf ",%s", \$1}' packagelist`
@Jawabiscuit
Jawabiscuit / debloat-windows-10.ps1
Last active December 30, 2020 06:41
Download git archive and run scripts to debloat a new Windows 10 install.
<#
Debloat Windows 10
.Description
Download git archive and run scripts to debloat a new Windows 10 install.
.Example
1) Open powershell as administrator
2) `Set-ExecutionPolicy AllSigned -Force` to allow execution of scripts
3) Find the raw URL to this gist
4) `iex ((new-object net.webclient).DownloadString("https://gist.githubusercontent.com/<USER>/.../debloat-windows-10.ps1")` to execute
#>