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 / gist:8684551
Created January 29, 2014 09:33
org-mode-clock-in-default
;;Add your default-elisp task id to "id-of-default-elisp-task"
(defvar ype/default-elisp-id "id-of-default-elisp-task")
;;This lets you M-x to your elisp task
(defun ype/clock-in-default-elisp ()
(interactive)
(org-with-point-at (org-id-find p_e/default-elisp-id 'marker)
(org-clock-in '(16))))
;;In the elisp task do something like this...
@ype
ype / mysql-connector-java.rb
Last active August 29, 2015 14:01
Homebrew Formula for mysql-connector-java [5.1.30]
require 'formula'
class MysqlConnectorJava < Formula
homepage 'http://dev.mysql.com/downloads/connector/j/'
url 'http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.30.tar.gz'
sha1 '726240f679eddb3429755e24624505666b97b199'
def install
prefix.install_metafiles
libexec.install Dir['*.jar']
@ype
ype / reload-rst.sh
Created May 16, 2014 23:44
Watchdog bashscript for python hovercraft GChrome browser reload on file change
#!/usr/bin/bash
# Script to quickly reload the browser
# while creating a presentation using Hovercraft (impressjs)
#
# Requires:
# pip install hovercraft
# pip install watchdog
# chromix: https://github.com/smblott-github/chromix
watchmedo shell-command \
@ype
ype / kanban.org
Last active August 29, 2015 14:01
Kanban in orgmode (require 'kanban)
@ype
ype / kanban-macro.el
Last active August 29, 2015 14:01
Emacs Macro to add a Kanban table to orgfile
;; Emacs macro to add a kanban table to file
;; Requires Kanban (M-x package-install "kanban")
(fset 'kanban
"
| TODO | DOING | DONE |
|------+-------+------|
| | | |
| | | |
| | | |
#+TBLFM: @1='(kanban-headers $#)::@2$1..@>$>='(kanban-zero @# $# nil (list \"~/path/to/file.org\"))
@ype
ype / asana-client-quick-id.sh
Last active August 29, 2015 14:01
asana-client get task #id only, for git commit #task-ref
asana personal | perl -lne 'm/\d{14}?/; print ${^MATCH}'
@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 ;;
@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 / 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 / strip_links.sh
Last active August 29, 2015 14:05
Strips Links from a Page