This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import difflib | |
from dataclasses import dataclass, field | |
@dataclass(frozen=True) | |
class LineAdded: | |
line: str | |
content: str | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Slow Network Fix | |
wsl --shutdown | |
Set-NetAdapterLso -Name "vEthernet (WSL)" -IncludeHidden -IPv4Enabled $False -IPv6Enabled $False | |
# Minimal Config (forward ports & limit ram) | |
[wsl2] | |
memory=2GB | |
localhostForwarding=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gpg --list-secret-keys --keyid-format=long | |
git config --global --unset gpg.format | |
git config --global user.signingkey OUTPUT_GPG_KEY! | |
git config --global commit.gpgsign true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
import subprocess | |
DIRNAME = os.path.join(os.path.dirname(__file__), ".minecraft") | |
LIBRARIES = os.path.join(DIRNAME, "libraries") | |
VERSIONS = os.path.join(DIRNAME, "versions") | |
VERSION = "1.12.2" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AndroidSDK | |
sudo snap install androidsdk | |
# JDK 8 | |
sudo apt-get install openjdk-8-jdk | |
sudo update-alternatives --config java | |
# .bashrc / .zshrc | |
export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64" | |
export ANDROID_HOME="$HOME/AndroidSDK" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Shift>Alt_L']" | |
gsettings set org.gnome.desktop.wm.keybindings switch-input-source-backward "['<Alt>Shift_L']" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Movement] | |
(Lines) | |
<n>G or <n>gg - go to <n>th line | |
$ - go to end of the line | |
0 - go to the beginning of the line | |
^ - go to the first non-empty character of the line | |
<n>% - go to the <n>% of the file | |
<n>up/down - go <n> lines up/down | |
(Words) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$THEME_NAME = "takuya"; | |
$THEME_CUSTOM = 0; | |
$THEME_URL = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/default.omp.json"; # For THEME_CUSTOM = 1 | |
if($THEME_CUSTOM -eq 0) { | |
$THEME_URL = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/${THEME_NAME}.omp.json"; | |
} | |
oh-my-posh init pwsh --config "${THEME_URL}" | Invoke-Expression |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.shortcuts import get_object_or_404 | |
class MultipleFieldLookupMixin: | |
lookup_ignorecase = True | |
def get_object(self): | |
queryset = self.get_queryset() | |
queryset = self.filter_queryset(queryset) | |
filter = { | |
"{}{}".format( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const MAX_PARTICLES = 500; | |
const PARTICLE_COLOR = "rgba(174, 194, 224, 0.5)"; | |
const PARTICLE_SPEED = 10; | |
const TEXT_COLOR = "rgba(255, 255, 255, .2)"; | |
const TEXT_FONT = "bold 36px Arial"; | |
const body = document.body; | |
function randomInt(min, max) { |
NewerOlder