Skip to content

Instantly share code, notes, and snippets.

@commit
def creating_commit(commit_message):
if action is "Creating post":
tag = "Post"
elif action is "Updating post":
tag = "Update"
elif action is "Changing configuration":
tag = "Config"
elif action is "Updating theme":
tag = "Theme"
EXERCISES = [
"Put on sport shoes"
"Go to the gym",
"Rowing",
"Exercises with light weights",
"Exercises with heavy weights"
]
TRAVEL_EXERCISES = [
"1 Squat",
@after_writing
def choose_next_post():
topics_list = get_topics_list()
if preference in topics_list:
post_topic = choose_prefered_topic()
else:
post_topic = choose_first_topic()
return post_topic
@time("22:00")
def evening_routine():
write_journal(kind="constrained")
write_journal(kind="free")
brush_teeth()
read(until="23:00")
@wakeup
def morning_routine():
get_up_from_bed()
go_bathroom()
if scale_available():
get_weight()
drink_water()
write_journal(kind="contrained")
write_journal(kind="free")
@new_system_creation
def systems_creation(system_name):
"""System to create new systems"""
file_name = "system-" + system_name + ".py"
create_new_file(file_name)
write_system_trigger_as_decorator()
write_system_as_function(function_name=system_name)
upload_as_gist(file_name)

Keybase proof

I hereby claim:

  • I am mrngilles on github.
  • I am mrngilles (https://keybase.io/mrngilles) on keybase.
  • I have a public key ASCY2XIykQkoNmnjEVpLokzJ3jpDlyKrPSDxSJg4hJ1ydwo

To claim this, I am signing this object:

@Mrngilles
Mrngilles / gist:29bed691119633e76482
Created January 18, 2016 16:39 — forked from nathanlippi/gist:5923326
Emacs + Tmux integrated window movement
;; Many thanks to the author of and contributors to the following posts:
;; https://gist.github.com/mislav/5189704
;; http://robots.thoughtbot.com/post/53022241323/seamlessly-navigate-vim-and-tmux-splits
;;
;; TODO: Make a script that generates tmux and emacs code without duplication
;;
;; NOTE: My keybindings are not the default emacs ones, using windmove
;; Try to move direction, which is supplied as arg
;; If cannot move that direction, send a tmux command to do appropriate move
from nose.tools import assert_equal, assert_is_not, assert_raises
def flatten_inheritance_dict(child_dict, parent_key,
expand_parent=lambda x: x):
"""Return a flattened version of dictionary that inherits from a parent.
Parameters
----------
child_dict : dict

Switch To Vim For Good

This guide is coming from an email I used to send to newcomers to Vim. It is not intended to be a complete guide, it is about how I did the switch.

Some background: my decision to switch to Vim has been made a long time ago. Coming from TextMate 1, I wanted to learn an editor that is Open Source (so I don’t lose my time learning a tool that can be killed), cross platform (so I can use it everywhere), and powerful enough (so I won’t regret TextMate). For these reasons, Vim has always been the editor I wanted to learn, but it took me several years before I did it in a way that works for me. I tried to switch progressively, using the Janus Vim distribution for a few months, then got back to using TextMate 2 for a time, waiting for the next attempt… here is what finally worked for me.

Non Optional

  1. Watch the Derek Wyatt videos in order (at least the “Novice” ones for now): http://derekwyatt.org/vim/tutorials/
  2. Read the first part of this Sta