Skip to content

Instantly share code, notes, and snippets.

View jarun's full-sized avatar

Arun jarun

View GitHub Profile
@jarun
jarun / custom fish prompt
Last active April 29, 2017 09:46
fish_prompt.fish
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 October 9, 2015 03:18
log the output of a command (as well as show in terminal)
#!/bin/bash
"$@" 2>&1 | tee /tmp/lastlog
@jarun
jarun / xft-settings.sh
Last active April 26, 2016 13:56
Manjaro LXQt infinality settings [/etc/X11/xinit/xinitrc.d/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 06:13
Add the same text at the beginning of multiple lines

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 June 5, 2016 19:00
How to install Travis CI locally on Ubuntu 16.04
sudo apt install ruby ruby-dev
sudo gem install travis
# install path: /var/lib/gems/
@jarun
jarun / .fonts.conf
Last active September 5, 2016 02:55
.fonts.conf on Voyager
<?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 March 12, 2017 14:34
"Sharpened" profile settings on Voyager with nice rendering.
##################################################################
### 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 March 5, 2017 17:45
Quick template for 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 July 1, 2020 20:43
A collection of useful Google Chrome extensions
@jarun
jarun / stock_scripts.md
Last active March 18, 2017 17:19
Stock price

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'