Skip to content

Instantly share code, notes, and snippets.

View miron's full-sized avatar
🧘‍♂️
Smashing Python for Fun and Profit

Miron miron

🧘‍♂️
Smashing Python for Fun and Profit
View GitHub Profile
@miron
miron / python.py
Last active November 10, 2023 17:08
python oneliners
from IPython.terminal.prompts import Prompts, Token
class MyPrompt(Prompts):
def in_prompt_tokens(self, cli=None):
return [ ( Token.Prompt, "λ ",), ]
def out_prompt_tokens(self, cli=None):
return []
ip = get_ipython() # only in ipython
ip.prompts = MyPrompt(ip) # A minimal prompt for ipython
# Run external python file in blender
@miron
miron / About.md
Last active July 21, 2023 17:06
Sport

Street Yoga ist Symbiose aus Kraft und Flexibilität.

Modernes Yoga, das größtenteils auf Tirumalai Krishnamacharyas Lehren gründet, beinhaltet kraftvolle Übungen wie z.B. den klassischen Sonnengruß, Chaturangas (Liegestütze), in den Handstand pressen und den Unterarmstand. Viele davon sind dem indischen Wrestling (Kushti) entnommen worden. Diese Übungen strapazieren die Schultern einseitig mit drückenden Bewegungen und vernachläßigen Muskelpartien wie Bizeps und oberen Rücken. Da beim Yoga bis auf Blöcke, Straps und Yoga Wheels keine weiteren Hilfsmittel verwendet werden, ist dies nicht verwunderlich.

Es gibt auch ziehende Übungen wie z.B. Paschimottanasana (einfache Vorwärtsbeuge),

@miron
miron / cli.sh
Last active February 12, 2023 14:27
cheatsheet
# grepable with inline comments.
# create alias: gh alias set cheat 'gist view 4997128'
# gh cheat | grep cheat -C 3, shows 3 lines before and after,
# Windows Powershell: gh cheat | Select-String cheat
bind -p | grep -v '^#\|self-insert\|^$' #list bash vim keybindings
shopt #shell options
bind -P #print keybindings
bash -x #print shellscript before executing, execute commands from file
help #brief summaries of builtin commands
@miron
miron / README.md
Created June 24, 2022 02:39 — forked from atenni/README.md
How to permalink to a gist's raw file

Problem: When linking to the raw version of a gist, the link changes with each revision.

Solution:

To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/

To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]

@miron
miron / design_patterns.md
Last active May 19, 2022 02:23
The 23 Design Patterns of the Gang of Four

Creational Patterns

✔️ Abstract Factory
✔️ Builder
✔️ Factory Method
✔️ Prototype
✔️ Singleton

Structural Patterns

@miron
miron / command
Last active April 24, 2022 11:59
the ten commandments
10. grep #search
09. lldb #correct
08. dwm #present
07. gh #browse
06. vim #write
05. git #address
04. nmap #secure
03. bpftrace #observe
02. objdump #dissect
01. python #command
@miron
miron / run.sh
Last active October 1, 2020 02:13 — forked from russjones/run.sh
teleport enhanced session recording (bpf)
#!/bin/bash
set -euo pipefail
RELEASE="teleport-v4.2.3-linux-amd64-bin.tar.gz"
if [[ $EUID -ne 0 ]]; then
echo "--> Please run this script as root or sudo."
exit 1
fi
@miron
miron / config.rb
Created March 16, 2013 00:26
transparent raggle
$config = {
'config_dir' => Raggle::Path::find_home + '/.raggle',
'config_path' => '${config_dir}/config.rb',
'feed_list_path' => '${config_dir}/feeds.yaml',
'feed_cache_path' => '${config_dir}/feed_cache.store',
'theme_path' => '${config_dir}/theme.yaml',
'grab_log_path' => '${config_dir}/grab.log',
'cache_lock_path' => '${config_dir}/lock',
'web_ui_root_path' => Raggle::Path::find_web_ui_root,
'web_ui_log_path' => '${config_dir}/webrick.log',