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
function telegram_notify | |
set encoded_text (python -c "import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))" "$argv") | |
curl "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage?chat_id=$TELEGRAM_BOT_CHANNEL&text=$encoded_text" | |
end |
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
# Uninstall all packages | |
pip uninstall -y (pip freeze) |
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
pip freeze | xargs -I {} pip uninstall -y {} |
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
class Item { | |
final int i; | |
final bool show; | |
Item(this.i, this.show); | |
String toString() { | |
return 'Item i=$i show=$show'; | |
} |
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
<?php | |
$output = shell_exec('hostname'); | |
echo "<pre>$output</pre>"; | |
?> |
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 | |
hostname |
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
" Took most of this from here https://realpython.com/vim-and-python-a-match-made-in-heaven/#macos-os-x | |
set shell=/bin/bash | |
" https://realpython.com/vim-and-python-a-match-made-in-heaven/#vundle " | |
set nocompatible " required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim |
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
class QueryMap<T> { | |
Map<String,T> _data; | |
QueryMap(Map<String,T> data) { | |
_data = Map<String,T>(); | |
data.forEach((k, v) => _data[new Symbol(k).toString()] = v); | |
} | |
dynamic noSuchMethod(Invocation invocation) { |