Skip to content

Instantly share code, notes, and snippets.

Takumi Kinjo kinjo

  • Japan
Block or report user

Report or block kinjo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kinjo
kinjo / Dockerfile
Last active Jul 8, 2019
Dockerfile for Apache2
View Dockerfile
FROM ubuntu:latest
MAINTAINER Takumi Kinjo
RUN apt-get update
RUN apt-get check
RUN apt-get dist-upgrade -y
RUN apt-get install -y apache2
# See http://www.kstaken.com/blog/2013/07/06/how-to-run-apache-under-docker/
@kinjo
kinjo / org2doku
Created Mar 21, 2011
Convert Emacs org-mode formatted text to Dokuwiki formatted one.
View org2doku
#!/usr/bin/env perl
# Usage
#
# cat <<EOF | ./org2doku
# * heading
#
# - item
# - sub item
#
@kinjo
kinjo / .gitignore
Created Aug 5, 2010
HTML5 Presentation export for Org-mode
View .gitignore
README.html
@kinjo
kinjo / .gitignore
Last active Aug 12, 2017
my favorite elisps
@kinjo
kinjo / enake-camel.el
Created Apr 2, 2012
snake-case/camel-case elisp functions
View enake-camel.el
;; Usage:
;;
;; (defun snake-camel () (interactive)(kill-new(upcase-first(snake-to-camel(car kill-ring)))))
;; (defun camel-snake () (interactive)(kill-new(upcase(camel-to-snake(car kill-ring)))))
(defun snake-to-camel (s)
""
(setq s (downcase s))
(if (string-match "_" s)
(concat (let ((fs (substring s 0 (match-beginning 0))))
@kinjo
kinjo / pfping
Last active Jun 19, 2016
A wrapper of fping to print pretty timestamp and host description.
View pfping
#!/bin/bash
#
# A wrapper for fping to print pretty timestamp and host description.
#
# Copyright (C) 2016 Takumi KINJO - All Rights Reserved
# Permission to copy and modify is granted under the MIT license
# Version 0.1.0
# Licence: MIT
usage()
@kinjo
kinjo / inventory.cgi
Created Jun 19, 2016
Obtain inventory by JSON. Cisco Catalyst is supported.
View inventory.cgi
#!/usr/bin/env perl
use File::Basename;
use JSON 'encode_json';
my $XLOGIN = '/usr/lib/rancid/bin/clogin';
sub usage
{
print <<EOS;
@kinjo
kinjo / deporc
Last active Apr 9, 2016
depo tool
View deporc
#!/bin/zsh
# Make a directory to store the depo.
#
# mkdir ~/depo
# cd ~/depo
#
# If you use Zsh, type below to define the utility functions.
#
# . <(curl -L http://goo.gl/mhGoq)
View wol-vmrun.py
#!/usr/bin/env python
# Recieve WOL packet and then run vmrun command to boot VM.
#
# sudo ./wol-vmrun ~/path/to/vm1.vmx@xx:xx:xx:xx:xx:xx ~/path/to/vm2.vmx@yy:yy:yy:yy:yy:yy
#
# Tested on OS X El Capitan and VMware Fusion 8 Pro.
import re
import sys
@kinjo
kinjo / outlinefill.pl
Last active Jan 2, 2016
Fill the columns of a outline text.
View outlinefill.pl
#!/usr/bin/env perl
# outlinefill.pl <outline indent chars> <output delimiter>
@b = ();
while (<STDIN>) {
chomp;
@a = split /$ARGV[0]/, $_;
@b = () if ($#a < $#b);
You can’t perform that action at this time.