Skip to content

Instantly share code, notes, and snippets.

View safijari's full-sized avatar

Jari safijari

View GitHub Profile
### Keybase proof
I hereby claim:
* I am safijari on github.
* I am safijari (https://keybase.io/safijari) on keybase.
* I have a public key whose fingerprint is 5B01 E68E 96F2 7E9C 3D1A 7E15 4188 14D7 C0ED 743C
To claim this, I am signing this object:
@safijari
safijari / argh_examples.py
Created March 20, 2020 07:16
Python Libraries Video 1
import argh
def do_the_thing(required_arg, optional_arg=1, other_optional_arg=False):
"""
I am a docstring
"""
print((required_arg, type(required_arg)))
print((optional_arg, type(optional_arg)))
print((other_optional_arg, type(other_optional_arg)))
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@safijari
safijari / orgmode_spacemacs.org
Last active May 30, 2023 16:11
Org mode spacemacs tutorial file

I hope the tutorial has been useful to you. If it was kindly leave a like and a comment, and consider subscribing and turning on subscription notifications. I intend to make more videos like this on the topics mentioned before as well as on other spacemacs topic like magit (git plugin), large scale refactoring, and a number of other things. Thank you so much for watching.

Org tutorial

Note: a great reference can be had here http://spacemacs.org/layers/+emacs/org/README.html

Outlines/headers

Show that each outline has it’s associated “text” under it

@safijari
safijari / i3_config_kalman
Created January 6, 2019 04:51
my old i3 config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
from glob import glob
import rosbag
import yaml
import json
import os
fnames = glob('/folder/*.bag')
print fnames
bags = [rosbag.Bag(f) for f in fnames]
@safijari
safijari / bad circle test.py
Last active December 23, 2017 07:42
python properties
c = Circle(1)
print c.area # prints 3.141
print c.circumference # prints 6.282
c.radius = 2
print c.area # prints 3.141 which is incorrect
print c.circumference # prints 6.282 which is incorrect
@safijari
safijari / .Xresources
Last active January 17, 2018 21:04
my i3 configs
Xft.dpi: 130 # helpful with general DPI weirdness
@safijari
safijari / Dockerfile-blog
Created April 3, 2017 17:47
Basic ROS Kinetic Dockerfile with some additional niceties
FROM osrf/ros:kinetic-desktop-full
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
RUN apt-get update && apt-get install -y \
tmux \
zsh \
curl \
wget \
vim \
emacs24 \
@safijari
safijari / mortalscumbag-mit-containername.zsh-theme
Last active December 29, 2019 01:34
My custom ZSH theme (mortalscumbag with CONTAINERNAME visualization)
function my_git_prompt() {
tester=$(git rev-parse --git-dir 2> /dev/null) || return
INDEX=$(git status --porcelain 2> /dev/null)
STATUS=""
# is branch ahead?
if $(echo "$(git log origin/$(git_current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_AHEAD"
fi