Skip to content

Instantly share code, notes, and snippets.

View bluenex's full-sized avatar
🧐
Be explicit with the least redundant.

Tulakan Ruangrong bluenex

🧐
Be explicit with the least redundant.
View GitHub Profile
@bluenex
bluenex / latex_mtheme.md
Created September 2, 2015 18:22
The preparation in order to get mtheme works on my system.

Introduction

I'm now trying to move from MS Powerpoint to LaTeX Beamer, and thus I've found a theme on Github called mtheme (Metropolis package). It's somehow hard to use at first so that I write this Gist to remind myself when next time installation comes. The system for this setup is Mac OSX 10.10.5 with BasicTeX 2015.

Dependencies

@bluenex
bluenex / rand_bash.md
Last active September 13, 2015 16:44
Random bash commands that are useful (for me)

VS Code

Calling Visual Studio Code from command line. source

# VS Code 
## old version
code() {
    if [[ $# = 0 ]];
    then
 echo $PWD
@bluenex
bluenex / zsh_envi.md
Last active May 17, 2023 19:31
Moving to Zsh note and configuration settings.

Moving to Zsh

Have a good time with bash for a long while, it's time to try another tempting shell - Zsh. So, this Gist is nothing but my collection for the environment that I've searched and applied to my system. There is also this kind of Gist in a version of bash.

Why Zsh?

There are several shells out there but this is the one that is close to the bash with some useful and attractive features especially - yes, theme. Here are some good articles about how and why to choose Zsh over bash, enjoy trying!

@bluenex
bluenex / vim_note.md
Created September 27, 2015 17:33
Vim with spf13 cheat sheet

VIM NOTE

Vim with spf13 cheat sheet

Keys description
i insert before the cursor
I insert at start of line
a insert after the cursor
A insert at start of line
o insert line below
@bluenex
bluenex / AtomSnippets.md
Last active December 10, 2015 02:47
Collection of snippets in Atom

All snippets are placed in snippets.cson, you can find it from Atom > Open Your Snippets.

LaTeX

'.text.tex.latex':
  'bold text':
    'prefix': 'b'
    'body': '\\\\textbf{$1}'
  'italic text':
    'prefix': 'i'
@bluenex
bluenex / Robot.py
Created July 31, 2016 15:08
Robot class for dynamixel servo motors
import os
import dynamixel
import sys
import subprocess
import optparse
import json
import time
import jsonpickle
from PyQt5.QtCore import pyqtSlot, pyqtSignal, QThread
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Facebook.Unity;
using UnityEngine.UI;
public class fb_api : MonoBehaviour {
public Button showProfilePic;
public Image profilePic;
@bluenex
bluenex / general_parsing_data.ipynb
Created March 11, 2017 07:01
general steps for EMG data loading & parsing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bluenex
bluenex / how-to-run.md
Last active October 11, 2023 09:04
Guide to run script on terminal in the background with log.

Running in the background

This command can be applied to anything run on cli, for example bash script and python script.

Two ways to do

There are two ways to run process in the background, nohup and & (ampersand).

Steps

Original dpoggi.zsh-theme

if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"

PROMPT='%{$fg[$NCOLOR]%}%n%{$reset_color%}@%{$fg[cyan]%}%m\
%{$reset_color%}:%{$fg[magenta]%}%~\
$(git_prompt_info) \
%{$fg[red]%}%(!.#.»)%{$reset_color%} '