Skip to content

Instantly share code, notes, and snippets.

View ype's full-sized avatar
‼️
writing all the codes.

Anton Strilchuk ype

‼️
writing all the codes.
View GitHub Profile
@ype
ype / filter_allrepo_links.sh
Created April 18, 2015 13:16
filter links from repo_list.txt
@ype
ype / list_allrepo_links.sh
Created April 18, 2015 13:15
generates a list of all the repos in a given directory
@ype
ype / chg_header_csv.sh
Created April 18, 2015 13:08
quick replaces headers in a csv file
sed -e '1s/.*\,\{,4\}/col1\,col2\,col3\,col4/g' some_file.csv
@ype
ype / Makefile
Last active August 29, 2015 14:19
run some quick commands using make
sloccount:
find . -name "*.go" -print0 | xargs -0 wc -l
@ype
ype / osx1010_partition_reclaim.md
Created December 17, 2014 05:22
Repair Unruly Partition on OSX 10.10

Step one: get lvUUID

'''sh diskutil cs list '''

Revert partition

'''sh diskutil coreStorage revert lvUUID

@ype
ype / DayWeekNum_strip_extra.sh
Last active August 29, 2015 14:06
Strip all content but day-Week-num from files or folders
#!/bin/bash
# Create an array of the strings we want to remove
remove_string=();
# CAUTION: using * grabs all files and folder in current directory
# you've been warned
for i in *
do
a=$((a+1)); #counts up
@ype
ype / strip_links.sh
Last active August 29, 2015 14:05
Strips Links from a Page
@ype
ype / getquote.pl
Created August 6, 2014 17:36
Quick Currency Quotes with Perl (for use with Ledger-CLI)
#!/usr/bin/env perl
$timeout = 60;
use Finance::Quote;
use POSIX qw(strftime localtime time);
die "Usage: $0 FROM TO\n" unless defined($ARGV[1]);
my $q = Finance::Quote->new;
@ype
ype / ledger-currency.sh
Last active August 29, 2015 14:04
Ledger ZSH currency convert function
#LEDGER Quick Print Converted Accounts
bal() {
re='^[A-Za-z0-9]+$'
if [[ "$1" == "GBP" ]]
then
perl /usr/local/Cellar/ledger/*/share/ledger/contrib/getquote.pl CAD GBP > ~/.currencydb
elif [[ "$1" == "CAD" ]]
then
perl /usr/local/Cellar/ledger/*/share/ledger/contrib/getquote.pl GBP CAD > ~/.currencydb
else
@ype
ype / lazypostman.el
Last active August 29, 2015 14:04
Asynchronous SMTP for Emacs (v.25+)
;; -*- mode: Emacs-Lisp; tab-width: 2; indent-tabs-mode:nil; -*- ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Author: Anton Strilchuk <[email protected]> ;;
;; URL: http://ype.env.sh ;;
;; Created: 22-07-2014 ;;
;; Last-Updated: 22-07-2014 ;;
;; Update #: 5 ;;
;; By: Anton Strilchuk <[email protected]> ;;
;; ;;
;; Filename: lazypostman ;;