Aliasing docker exec -it some_container_name bash
to d some_container_name
.
Step 1.1 Add to your .bashrc
d(){
docker exec -it $1 bash
}
Step 1.2 Then source it
#!/usr/bin/env bash | |
NOTES_FILE=~/.notes | |
# KEYS | |
delete_line="Ctrl+d" | |
edit_note="Ctrl+e" | |
menu=$(echo -e "< Exit\n---\n1 [ Browse Library ]>\n2 [ Current Artist ]>\n3 [ Current Queue ]>\n---\n4 [ Options ]>\n5 [ Ratings ]>\n6 [ Help ]") |
python -c 'import yaml, sys; print(yaml.safe_load(sys.stdin))' < data.yaml |
""" | |
The MIT License (MIT) | |
Copyright (c) 2015 Mat Leonard | |
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 |
# writing c1 class definition to module mod1 | |
cs = """ | |
class c1(object): | |
att = 1 | |
def m1(self): | |
self.__class__.att += 1 | |
# printing class name, class-id, and the id of the class, which happens to be its memory address | |
print "uno:", self.__class__, "class-id:", id(self.__class__), "att:", self.__class__.att | |
""" |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
from tinydb.storages import MemoryStorage | |
from tinyrecord import transaction | |
from tinydb import TinyDB, Query | |
class TinyMemoryJsonClass(object): | |
def __init__(self, name): |
#!/bin/bash | |
setting=$(gsettings get org.gnome.settings-daemon.plugins.color night-light-enabled) | |
if [[ $setting == "true" ]]; then | |
gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled false | |
else | |
gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled true | |
fi |
import logging | |
import os | |
current_dir = os.path.dirname(os.path.abspath(__file__)) | |
logging.basicConfig( | |
format="%(asctime)s [%(threadName)-12.12s] [%(levelname)-5.5s] %(message)s", | |
handlers=[ | |
logging.FileHandler("{0}/{1}.log".format(current_dir, 'parse_log')), | |
logging.StreamHandler() |
class InitializationError(Exception): | |
pass | |
class TransitionClass: | |
def __init__(self, state): | |
self.state = state | |
def run(self, state_mashine): | |
return None |
#!/usr/bin/env python | |
"""python-xlib example which reacts to changing the active window/title. | |
Requires: | |
- Python | |
- python-xlib | |
Tested with Python 2.x because my Kubuntu 14.04 doesn't come with python-xlib | |
for Python 3.x. |