Skip to content

Instantly share code, notes, and snippets.

Avatar
🔨
I build things.

Kun R rankun203

🔨
I build things.
View GitHub Profile
View apple.conf
PROCESS-NAME,nsurlsessiond
DOMAIN-SUFFIX,mzstatic.com
View .vimrc
syntax on
set noerrorbells
set shiftwidth=2
set expandtab
set smartindent
set nu
set nowrap
set smartcase
set noswapfile
View edit-exif.js
const sh = require("shelljs");
const exiftool = require("exiftool-vendored").exiftool;
const folder =
"/Users/rankun203/Downloads/670 Claude Monet Paintings/670 Amazing Claude Monet Paintings [Up to 4500 Px]-1";
let files = [];
sh.ls(`${folder}/Pics/Monet Paintings/`).forEach((f) => files.push(f));
files = files.sort((a, b) => {
View keybase.md

Keybase proof

I hereby claim:

  • I am rankun203 on github.
  • I am kunswork (https://keybase.io/kunswork) on keybase.
  • I have a public key ASDNhlmpZoAVKHklH8qNCxFEzti4FHJTKGPWD_dT-klf4go

To claim this, I am signing this object:

View ping.perl
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010;
# ./ping-google.perl google.com
use Net::Ping;
my $host = "$ARGV[0]" || 'google.com';
View disable-dock-autohide-delay.fish
defaults write com.apple.Dock autohide-delay -float 0; and killall Dock
View check-dev.sh
#!/usr/bin/env bash
# Check local dev
check_command() {
WHERE=`whereis $1`
TIP=$2
if [[ -z "${WHERE}" ]]; then
echo "$1 is required, ${TIP}"
else
@rankun203
rankun203 / ensure-env.sh
Created Jan 18, 2018
Ensure environment is exist and empty
View ensure-env.sh
#!/usr/bin/env bash
# Functions --------
ensure_env () {
ENV_NAME="$1"
ENV_VAL=${!ENV_NAME}
if [[ -z "${ENV_VAL}" ]]; then
echo "${ENV_NAME} does not exists, exiting."
exit
else
@rankun203
rankun203 / download-file.sh
Last active Dec 26, 2017
Dump Rackspace Cloud Files Container
View download-file.sh
#!/usr/bin/env bash
# Usage:
# ./download-file.sh <CONTAINER_NAME> <FILE_PATH>
readonly CONTAINER="$1"
readonly FILE_PATH="$2"
readonly FILE_FOLDER=`dirname $FILE_PATH`
readonly IGNORED_FILES="lodestreams-docs/logs"
if [ "${FILE_PATH/$IGNORED_FILES}" = "$FILE_PATH" ] ; then
@rankun203
rankun203 / currencies.js
Last active Nov 29, 2017
Currencies helper
View currencies.js
// Data is from http://www.xe.com/symbols.php
const currencies = {
ALL: { code: 'ALL', fontCode: 'Lek' },
AFN: { code: 'AFN', fontCode: '؋' },
ARS: { code: 'ARS', fontCode: '$' },
AWG: { code: 'AWG', fontCode: 'ƒ' },
AUD: { code: 'AUD', fontCode: '$' },
AZN: { code: 'AZN', fontCode: '₼' },
BSD: { code: 'BSD', fontCode: '$' },
BBD: { code: 'BBD', fontCode: '$' },