Skip to content

Instantly share code, notes, and snippets.

@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
###
###
@dbader
dbader / fontdemo.py
Last active August 2, 2021 12:31
For my Raspberry Pi internet radio project I needed a way to render text suitable for a low resolution monochrome LCD. This article describes how to render 1-bit text using FreeType and Python. See http://dbader.org/blog/monochrome-font-rendering-with-freetype-and-python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Needs freetype-py>=1.0
# For more info see:
# http://dbader.org/blog/monochrome-font-rendering-with-freetype-and-python
# The MIT License (MIT)
#
# Copyright (c) 2013 Daniel Bader (http://dbader.org)
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@wickman
wickman / README.md
Created April 12, 2012 22:55
Python development in Pants (tutorial)

Python development using Pants

brian wickman - @wickman

[TOC]

Why use Pants for Python development?

Pants makes the manipulation and distribution of hermetically sealed Python environments

@mahmoudimus
mahmoudimus / python-monkey-patch-built-ins.py
Created February 4, 2010 22:20
pythonic monkey patching built-in types
# found this from Armin R. on Twitter, what a beautiful gem ;)
import ctypes
from types import DictProxyType, MethodType
# figure out side of _Py_ssize_t
if hasattr(ctypes.pythonapi, 'Py_InitModule4_64'):
_Py_ssize_t = ctypes.c_int64
else:
_Py_ssize_t = ctypes.c_int