Skip to content

Instantly share code, notes, and snippets.

View YoraiLevi's full-sized avatar
🎯
Focusing

Yorai Levi YoraiLevi

🎯
Focusing
View GitHub Profile
@alimbada
alimbada / Export-Chocolatey.ps1
Last active April 21, 2024 11:39
Export installed Chocolatey packages as packages.config - thanks to Matty666
#Put this in Export-Chocolatey.ps1 file and run it:
#.\Export-Chocolatey.ps1 > packages.config
#You can install the packages using
#choco install packages.config -y
Write-Output "<?xml version=`"1.0`" encoding=`"utf-8`"?>"
Write-Output "<packages>"
choco list -lo -r -y | % { " <package id=`"$($_.SubString(0, $_.IndexOf("|")))`" version=`"$($_.SubString($_.IndexOf("|") + 1))`" />" }
Write-Output "</packages>"
@JarvisPrestidge
JarvisPrestidge / Pok3r.ahk
Last active April 11, 2024 08:32
Personal AutoHotKey script that turns any keyboard into a Pok3r.
#CommentFlag //
#InstallKeybdHook
// Author: Jarvis Prestidge
// Description: Simulates my preferred keyboard layout, similiar to that of the Pok3r 60% keyboard
// on any keyboard without programmable keys. i.e. my laptop ^^
// <COMPILER: v1.1.22.00>
@0x4D31
0x4D31 / beautiful_idiomatic_python.md
Last active July 8, 2024 09:36 — forked from JeffPaine/beautiful_idiomatic_python.md
[Beautiful Idiomatic Python] Transforming Code into Beautiful, Idiomatic Python #python

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]:
@hucsmn
hucsmn / wsl2.md
Last active July 5, 2024 19:20
A collection of WSL2 hacks

Notes on configuring ArchWSL on WSL2.

Basic setup

Edit %UserProfile%\.wslconfig:

[wsl2]
swap=0
localhostForwarding=true
@jaw
jaw / EnvPaths.psm1
Last active June 14, 2024 04:49 — forked from mkropat/EnvPaths.psm1
# How to use
#
# First, you need to import the script:
# > Import-Module -Name "C:\Your\Path\to\EnvPaths.psm1"
#
# Add C:\Foo as the first path in the current session (goes away when you log out / close the window):
# > Add-EnvPathFirst -Path "C:\Foo"
#
# Add C:\Foo as the first path in the machine path (all users):
# > Add-EnvPathFirst -Path "C:\Foo" -Container Machine