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
# Copyright 2021-2023 Mukunda Modell | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and | |
# associated documentation files (the “Software”), to deal in the Software without restriction, | |
# including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
# and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, | |
# subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in all copies or substantial | |
# portions of the Software. |
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
search pattern: | |
((from ['"]\..*)[^.](\w\w))(['"]) | |
replacement string: | |
$1.js$4 |
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
#!/bin/bash | |
set -e | |
for i in $( cat ~/gitfat.list ); do | |
scapdir=`dirname $i` | |
echo "cd $scapdir" | |
pushd $scapdir | |
git status | |
cat scap.cfg | |
sed -i.bak '/git_fat: True/a git_binary_manager: git-fat' scap.cfg | |
git add scap.cfg |
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
#!/bin/bash | |
HOST="$1" | |
shift | |
ssh $@ deployment-$HOST.deployment-prep.eqiad.wmflabs |
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 . import graph | |
from . import op | |
class Phabricator(Deployment): | |
class source(GitRepo): | |
load_submodules = True | |
class conf(ConfigFile): |
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 hashlib | |
def compare_sha256(password, hashed_password): | |
m = hashlib.sha256() | |
m.update(password) | |
result = m.hexdigest() | |
return hashed_password == result | |
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
--- | |
:hierarchy: | |
- %{env}/%{variant}_%{role}_%{group}_%{location} | |
- %{env}/%{variant}_%{role}_%{group} | |
- %{env}/%{variant}_%{role} | |
- %{env}/%{variant} | |
- %{env} | |
:backends: | |
- yaml | |
:yaml: |
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
# This depends on git bash completion: | |
# https://github.com/git/git/blob/master/contrib/completion/git-completion.bash | |
BLACK="\[$(tput setaf 0)\\" | |
RED="\[$(tput setaf 1)\]" | |
GREEN="\[$(tput setaf 2)\]" | |
LIME="\[$(tput setaf 190)\]" | |
YELLOW="\[$(tput setaf 3)\]" | |
POWDER_BLUE="\[$(tput setaf 153)\]" |
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
if [ "iTerm.app" == "$TERM_PROGRAM" ] ; then | |
# set up an array of RGB values | |
tabcolors[0]="244,0,200" | |
tabcolors[1]="0,200,244" | |
tabcolors[2]="68,250,132" | |
tabcolors[3]="250,68,132" | |
tabcolors[4]="250,132,68" | |
tabcolors[5]="220,200,100" | |
TTYNUM=`ps -p $$ -o tty= | cut -c 5,6,7` |
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
Version = 4 | |
Booleans = {'caretLineVisible': True, 'preferFixed': 1, 'useSelFore': False} | |
CommonStyles = {'attribute name': {'fore': 8904824}, | |
'attribute value': {'fore': 13676752}, | |
'bracebad': {'back': 13209, 'bold': 1, 'fore': 13434879}, | |
'bracehighlight': {'bold': 1, 'fore': 10197815}, | |
'classes': {'fore': 16764108}, | |
'comments': {'bold': False, 'fore': 8953467, 'italic': False, 'size': 16}, |