This file contains hidden or 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
export_alias() { | |
local name=$1 | |
shift | |
local alias_dir="$PWD/.direnv/aliases" | |
local alias_file="$alias_dir/$name" | |
local oldpath="$PATH" | |
mkdir -p "$alias_dir" |
This file contains hidden or 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
{ | |
"[python]": { | |
"editor.formatOnSave":true, | |
"editor.codeActionsOnSave": { | |
"source.fixAll": "always", # You have to use "always" unlike what the ruff documentation says. "explicit" never works for me. | |
"source.organizeImports": "always" # You have to use "always" unlike what the ruff documentation says. "explicit" never works for me. | |
}, | |
"editor.defaultFormatter": "charliermarsh.ruff" | |
}, | |
"files.autoSave": "onFocusChange" |
This file contains hidden or 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 fs from 'fs/promises'; | |
import path from 'path'; | |
import {type Plugin} from 'vite'; | |
const supportedLanguages: { [code: string]: string } = { | |
'de': 'Deutsch', | |
'en': 'English', | |
'es': 'Español' | |
} |
This file contains hidden or 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
# Input | |
# local.kube_config_path - path to kubeconfig.yml | |
# local.external_ips - list of external ips | |
# Providers | |
terraform { | |
required_providers { | |
kubernetes = { |
This file contains hidden or 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
# This gist is compatible with Ansible 1.x . | |
# For Ansible 2.x , please check out: | |
# - https://gist.github.com/dmsimard/cd706de198c85a8255f6 | |
# - https://github.com/n0ts/ansible-human_log | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
This file contains hidden or 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
# https://github.com/dunovank/jupyter-themes | |
jt -t onedork -T -fs 12 -ofs 11 -f meslo -cellw 100% -altp -lineh 130 |
This file contains hidden or 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
#!/bin/sh -x ## or just ` curl -Ls http://git.io/vRozn | sh `. | |
## Downloads the Mac OS X 10.10 Recovery Partition update, | |
## Copy's over the 10.10 version of Disk Utility.app, then | |
## use git to apply a binary patch so it will run on 10.11+. | |
cd /tmp | |
# rm -rf DU1010 | |
mkdir -p DU1010 |
This file contains hidden or 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
#!ruby | |
# Requirements: | |
# brew install trash | |
casks_path = '/opt/homebrew-cask/Caskroom' | |
if `brew list | grep trash`.empty? | |
puts 'Please make "brew install trash" before' | |
exit! |
This file contains hidden or 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
pp File.read('dump.txt'). | |
scan(/class="mem_link"\starget="_blank">([^<]+)/m). | |
flatten. | |
inject(Hash.new(0)) { |total, e| total[e] += 1 ;total}. | |
map{|k,v| [v, k] }. | |
sort{|a, b| a[0] <=> b[0] } |
This file contains hidden or 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
#!ruby | |
# Requirements: | |
# brew install trash | |
casks_path = '/opt/homebrew-cask/Caskroom' | |
class Version < Array | |
def initialize s | |
super(s.split('.').map { |e| e.to_i }) |
NewerOlder