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 / presentation.org
Created July 30, 2019 02:51 — forked from abrochard/presentation.org
Notes from the "Conquering Kubernetes with Emacs" presentation

Conquering Kubernetes with Emacs

Specific Annoying workflow

Listing pods with kubectl get pods, then select a pod name and copy paste it into kubectl logs [pod name]

Why?

  • I want to streamline my workflow and stop using the terminal
  • learn more about kubernetes
  • main kubernetes extension for Emacs out there is greedy for permissions
#!/usr/bin/env bash
#
# DESC
# Bash script to manage Cisco AnyConnect VPN connections.
#
# Integrates with OS X KeyChain for password accesss.
#
# USAGE
# To use this script to manage VPN connections, create the following:
(ns backend.free-port
(:require [clojure.string :as str]
[clojure.java.shell :as shell]
[taoensso.timbre :as timbre]))
;; copy from https://gist.github.com/ptaoussanis/4283150
;; A little utility to allow simple redeployment of Clojure web servers with zero downtime, and without the need for a proxy or load balancer. Just wrap any port-binding calls, and the utility will auto kill pre-existing servers as necessary. *nix only. Based on the blog post by Feng Shen, http://shenfeng.me/fast-restart-clojure-webapp.html
(defn with-free-port!
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
+
+
@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

@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 => user.followers > 1000)
-------------------------------------------------------------------------------------------
REFERENCES FOR LEARNING & USING APPLESCRIPT Modified: 2016/05/25 15:01
-------------------------------------------------------------------------------------------
NOTES
-------------------------------------------------------------------------------------------
AppleScript is a rather peculiar scripting language to learn.
/* 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.

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:

@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>