Skip to content

Instantly share code, notes, and snippets.

🔳

John Doe jarun

🔳
Block or report user

Report or block jarun

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jarun
jarun / custom fish prompt
Last active Apr 29, 2017
fish_prompt.fish
View custom fish prompt
alias l='ls'
alias lh='ll -h'
alias ll='ls -l'
#alias mic='amixer set Capture toggle'
alias hi='history'
alias au='sudo apt update'
alias make='colormake'
alias mv='mv -i'
alias pe='patool extract'
alias man='man -a'
@jarun
jarun / lastlog
Created Oct 9, 2015
log the output of a command (as well as show in terminal)
View lastlog
#!/bin/bash
"$@" 2>&1 | tee /tmp/lastlog
@jarun
jarun / xft-settings.sh
Last active Apr 26, 2016
Manjaro LXQt infinality settings [/etc/X11/xinit/xinitrc.d/xft-settings.sh]
View xft-settings.sh
#!/bin/bash
XFT_SETTINGS="
Xft.antialias: 1
Xft.autohint: 0
Xft.dpi: 96
Xft.hinting: 1
Xft.hintstyle: hintfull
Xft.lcdfilter: lcddefault
Xft.rgba: rgb
@jarun
jarun / text_at_beginning.md
Created May 23, 2016
Add the same text at the beginning of multiple lines
View text_at_beginning.md

vim

  • Press Ctrl-v to select the first column of text in the lines you want to change (visual mode).
  • Press Shift-i and type the text you want to insert.
  • Hit Esc, wait 1 second and the inserted text will appear on every line.

sed

$ sed -i 's/^/buku -u /' filename
@jarun
jarun / Travis CI local install
Created Jun 5, 2016
How to install Travis CI locally on Ubuntu 16.04
View Travis CI local install
sudo apt install ruby ruby-dev
sudo gem install travis
# install path: /var/lib/gems/
@jarun
jarun / .fonts.conf
Last active Sep 5, 2016
.fonts.conf on Voyager
View .fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Set preferred serif, sans serif, and monospace fonts. -->
<alias>
<family>serif</family>
<prefer><family>Open Sans</family></prefer>
</alias>
<alias>
<family>sans-serif</family>
@jarun
jarun / infinality setting
Last active Mar 12, 2017
"Sharpened" profile settings on Voyager with nice rendering.
View infinality setting
##################################################################
### INFINALITY ENVIRONMENT VARIABLES FOR EXTRA RUN-TIME OPTIONS ##
##################################################################
#
# These environment variables require that their respective patches
# from http://www.infinality.net have been applied to the Freetype
# installation you are using. They will do abolutely
# nothing otherwise!
#
@jarun
jarun / python timeit
Created Mar 5, 2017
Quick template for python timeit
View python timeit
#!/usr/bin/env python3
import timeit
'''
plus_stmt = """
row1 = 'hello world'
row2 = 'hello worlds'
out = '- [' + row2 + '](' + row1 + ')'
"""
@jarun
jarun / chrome_extensions.md
Last active Jul 6, 2018
A collection of useful Google Chrome extensions
View chrome_extensions.md
View stock_scripts.md

Covert currency:

#!/bin/bash

wget -qO- "http://www.google.com/finance/converter?a=$1&from=$2&to=$3" |  sed '/res/!d;s/<[^>]*>//g';

Get stock price:

curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s=avgo&f=l1'
You can’t perform that action at this time.