Skip to content

Instantly share code, notes, and snippets.

@akafael
akafael / hideButton.html
Created August 6, 2017 23:09
Tougle Hide Button for ipython code cells
<!-->
Hide Button for code
Put as part of a markdown cell
</!-->
<script>
function code_toggle() {
if (code_shown){
$('div.input').hide('500');
$('#toggleButton').val('Show Code')
@akafael
akafael / playDigimon.py
Created October 12, 2017 13:17
[Digimon Word 3 - PS1] Farming XP Script
#!/bin/python
##
# Digimon Word 3 - Farming XP Script
# @version 1.0 - Open Loop Movement
##
import time
import pyautogui
@akafael
akafael / kb-light.py
Created December 13, 2017 13:49
Control Keyboard Light using dbus
#!/usr/bin/env python3
# coding: utf-8
##
# Control keyboard backlight
##
from sys import argv
import dbus
@akafael
akafael / example.desktop
Last active February 2, 2018 00:10
DesktopLinksOnLinux
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=MyProgramName
GenericName= My Complete Program Name
Exec= /path/to/my/program.sh
Icon=/path/to/my/program/icon.png
Terminal=true
StartupWMClass=MyProgramGroupClass
Type=Application
@akafael
akafael / i3wm_keyboard.config
Created June 9, 2018 18:52
i3wm Keyboard Layout toogle shortcut
# i3wm Keyboard Layout toogle
bindsym $mod+space "exec setxkbmap -query | grep us && setxkbmap -layout br || setxkbmap -layout us"
@akafael
akafael / rosbag-python-ctrl.py
Created July 27, 2018 14:55
Sample Script for controling rosbag process
# Sample Script for controling rosbag process
# ref: https://answers.ros.org/question/10714/start-and-stop-rosbag-within-a-python-script/?answer=223617#post-id-223617
def terminate_process_and_children(p):
import psutil
process = psutil.Process(p.pid)
for sub_process in process.get_children(recursive=True):
sub_process.send_signal(signal.SIGINT)
p.wait() # we wait for children to terminate
p.terminate()
@akafael
akafael / stackingPlots.m
Last active December 9, 2018 22:28
Matlab stacking plots example
%% STACKPLOT
% Stacking two plots example from https://stackoverflow.com/questions/11757987/matlab-stacking-of-various-plots
%% Data
t = 0:100;
f1 = 0.3;
f2 = 0.07;
u1 = sin(f1*t); cu1 = 'r'; %red
u2 = cos(f2*t); cu2 = 'b'; %blue
v1 = 5*u1.^2; cv1 = 'm'; %magenta
@akafael
akafael / xorg.conf
Created February 1, 2019 14:31
XOrg config for SIS 671/771
Section "Device"
Identifier "Generic Video Card"
VendorName "Silicon Integrated Systems [SiS]"
BoardName "771/671 PCIE VGA Display Adapter"
Busid "PCI:1:0:0"
Driver "vesa"
Screen 0
Option "UseFBDev" "true"
Option "DPMS"
Option "ShadowFB"
@akafael
akafael / index.html
Created February 5, 2019 18:36
Nested & Color Coded Interactive Timeline
<div class="body-wrap">
<!-- # component starts -->
<div class="pres-timeline" id="this-timeline">
<!-- ### -->
<!-- <div class="periods-section"> -->
<div class="periods-container">
<section class="period-single" period="period1">
<h4 class="year">181x-181x</h4>
<h2 class="title">1 Lorem ipsum dolor sit amet, consectetur adipisicing.</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laudantium doloremque, laboriosam officia facere eligendi quam reiciendis, rem explicabo dolores tenetur libero minus, facilis quibusdam. Consectetur amet beatae fuga, architecto magnam.</p>
@akafael
akafael / license-badges.md
Created April 9, 2019 00:58 — forked from lukas-h/license-badges.md
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes