Skip to content

Instantly share code, notes, and snippets.

View agilecreativity's full-sized avatar
💻
(into [:having-fun-with] #{:clojure :clojurescript :emacs :devops :automation})

Burin Choomnuan agilecreativity

💻
(into [:having-fun-with] #{:clojure :clojurescript :emacs :devops :automation})
View GitHub Profile
@agilecreativity
agilecreativity / erubis_demo.rb
Created June 24, 2013 05:52
Erubis example with ruby
#!/usr/bin/env ruby
## encoding: utf-8
require 'pry'
require 'erubis'
module Example
# dummy data for testing
class Sample
def self.sample_list
require 'epubinfo'
require 'pry'
module Example
class EpubInfoDemo
def initialize
end
def extract_info(epub_file)
@agilecreativity
agilecreativity / zsh-bash-custom-script.sh
Created September 12, 2013 06:19
Load custom scripts from the given directory for zsh or bash
# Add to the end of your ~/.zshrc or ~/.bashrc
# Note: $ln -s ~/Dropbox/dotfiles/zsh/config/ ~/.zsh.d
if [ -d ~/.zsh.d ]; then
for i in ~/.zsh.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi
@agilecreativity
agilecreativity / gist:6590982
Created September 17, 2013 07:18
Vim mapping for clean up files
" Upgrade hackrocket to ruby 1.9 syntax
vnoremap <leader>h :s/:\(\w*\) *=>/\1:/g<cr>
" delete all trailing whitespace in current file
map <leader>w :%s/\s\+$//gce \| w<cr>
" delete all trailing whitespace for each file in repo
map <leader>W :args `git grep -lI .` \| argdo %s/\s\+$//gce \| w<cr>

Keybase proof

I hereby claim:

  • I am agilecreativity on github.
  • I am bchoomnuan (https://keybase.io/bchoomnuan) on keybase.
  • I have a public key ASAsqOJLJbCZfCpCjrTKHpj1FD2KgH-seiZJY0QFFe4o1wo

To claim this, I am signing this object:

/* Support for embedding graphical components in a buffer.
Copyright (C) 2011-2016 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
-------------------------------------------------------------------------------------------
REFERENCES FOR LEARNING & USING APPLESCRIPT Modified: 2016/05/25 15:01
-------------------------------------------------------------------------------------------
NOTES
-------------------------------------------------------------------------------------------
AppleScript is a rather peculiar scripting language to learn.
@agilecreativity
agilecreativity / active.md
Created December 31, 2017 07:27 — forked from paulmillr/active.md
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Tue, 06 Dec 2016 17:06:46 GMT till Wed, 06 Dec 2017 17:06:46 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user =&gt; user.followers &gt; 1000)
@agilecreativity
agilecreativity / readme.md
Created February 15, 2018 06:13 — forked from coolaj86/how-to-publish-to-npm.md
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser

diff --git a/.gitignore b/.gitignore
index c754e3ccc..deef6bbc3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -82,3 +82,9 @@ build_docker/
.av/config/vars/container
.av/config/vars/role
.av/config/vars/branch
+
+