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 | |
# see https://stackoverflow.com/a/46597567/1640414 | |
echo "started" | |
function a() { | |
# do some stuff here | |
echo "a()" | |
ls *.sh | |
} |
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/sh | |
# A script with functions to add to .bashrc | |
# Uploads a file or a zipped directory to `keep.sh` | |
# see https://free.keep.sh | |
# usage: transfer hello.txt | |
# requirements: curl | |
# based on transfer.sh old, not-working anymore script. | |
# A free bucket is provided by keep.sh for public use. Files are limited to 500MB and are deleted 24 hours after upload. | |
transfer() { |
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/sh | |
# A script with functions to add to .bashrc | |
# Uploads a file to transfer.sh | |
# see https://transfer.sh/ | |
# usage: transfer hello.txt | |
# requirements: curl | |
transfer() { | |
if [ $# -eq 0 ]; then | |
echo "No arguments specified.\nUsage:\n transfer <file|directory>\n ... | transfer <file_name>" >&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
curl -s https://api.github.com/repos/sharkdp/bat/releases/latest \ | |
| grep "browser_download_url.*amd64.deb" \ | |
| grep "bat-musl_" \ | |
| cut -d : -f 2,3 \ | |
| tr -d \" \ | |
| wget -P "$TempFileDirectory" -qi - && | |
sudo dpkg -i bat-musl*_amd64.deb |
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
# https://stackoverflow.com/a/37124230/1640414 | |
# https://caldwell.github.io/renderjson/ | |
import uuid | |
from IPython.display import display_javascript, display_html, display | |
import json | |
class RenderJSON(object): | |
def __init__(self, json_data): | |
if isinstance(json_data, dict): |
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 logging | |
logging.basicConfig(level="DEBUG", style="{", | |
format='[{asctime:s}] {levelname:7s} | {process:5d} | {name:s} | {message:s}') | |
_logger = logging.getLogger(__name__) |
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
{ | |
"mode": "flat", | |
"theme": "default", | |
"segments": [ | |
"virtual_env", | |
"hostname", | |
"ssh", | |
"cwd", | |
"git", | |
"hg", |
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
#!/usr/bin/env bash | |
# see https://forum.obsidian.md/t/gnome-desktop-installer/499 | |
set -euo pipefail | |
icon_url="https://cdn.discordapp.com/icons/686053708261228577/1361e62fed2fee55c7885103c864e2a8.png" | |
#dl_url=${1:-} | |
dl_url=$( curl -s https://api.github.com/repos/obsidianmd/obsidian-releases/releases/latest \ | |
| grep "browser_download_url.*AppImage" | tail -n 1 | cut -d '"' -f 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/sh | |
sudo apt-get install lyx culmus culmus-fancy texlive-lang-other | |
wget https://sourceforge.net/projects/ivritex/files/culmus-latex/culmus-latex-0.7/culmus-latex_0.7-1_all_fixed.deb/download -O culmus-latex_0.7-1_all_fixed.deb | |
sudo dpkg -i culmus-latex_0.7-1_all_fixed.deb | |
sudo apt-get install -f | |
rm -f culmus-latex_0.7-1_all_fixed.deb |
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: "3.5" | |
services: | |
mongo: | |
image: mongo:latest | |
container_name: mongo | |
environment: | |
MONGO_INITDB_ROOT_USERNAME: admin | |
MONGO_INITDB_ROOT_PASSWORD: admin | |
ports: |
NewerOlder