Skip to content

Instantly share code, notes, and snippets.

View zeph1e's full-sized avatar

Yunsik Jang zeph1e

  • LG Electronics, Inc.
  • Seoul, Korea
View GitHub Profile
@zeph1e
zeph1e / bashrc_no_gitps_for_nfs.sh
Last active April 22, 2016 04:22
Avoid $(git_ps) for NFS mounted directory
export NFS_MOUNT_PATH="$HOME/titan" # colon-separated list
export BACKUP_PS1=
function avoid_gitps_on_nfs() {
IFS=":"
set $NFS_MOUNT_PATH
for var in $NFS_MOUNT_PATH; do
if [ -n "`echo \"^$PWD\" | grep -e $var`" ]; then
export BACKUP_PS1=$PS1
export PS1=$NFS_PS1
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <syslog.h>
#include <string.h>
(save-excursion
(setq xx-overlay (make-overlay (1+ (line-beginning-position)) (line-end-position)
nil t))
(overlay-put xx-overlay 'wrap-prefix t)
(overlay-put xx-overlay 'before-string
(propertize "o" 'display (list (list 'margin 'right-margin)
"Overlay text")
)))
@zeph1e
zeph1e / pedal.ino
Created July 20, 2017 15:43
Foot pedal prototype
/*
* Foot pedal prototype
*/
#include <HID.h>
#include <Keyboard.h>
#define PIN_CTRL 2
#define PIN_ALT 3
#define PIN_SHIFT 4
@zeph1e
zeph1e / bashrc_id.sh
Created March 8, 2017 07:18
bashrc_id.sh
#!/bin/bash
export CRED=root@id
SSH=$(whereis ssh | awk '{print $2}')
JQ=$(whereis jq | awk '{print $2}')
SCP=$(whereis scp | awk '{print $2}')
if [ -z "$SSH" ]; then
echo "Unable to find ssh" 1>&2
return 1