Skip to content

Instantly share code, notes, and snippets.

Takumi Kinjo kinjo

  • Japan
View GitHub Profile
@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 / 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()
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
View study.md

2015-08-21

  • Takumi KINJO
  • Unix コマンド基礎

対象者

  • インフラ屋さん(NW、サーバ、ストレージなど)
  • Unix 系 OS との対話がどんなものか少し知っている
  • 勉強して業務を効率化したい
View extra-letter-case.el
;;; extra-letter-case.el --- Extra letter case
;; Copyright (C) 2014 Takumi Kinjo
;; Author: Takumi Kinjo <takumi.kinjo@gmail.com>
;; Keywords: convenience, wp
;; This file is not part of GNU Emacs.
;; This program is free software; you can redistribute it and/or modify
@kinjo
kinjo / Vagrantfile
Created Sep 6, 2014
My trial of Ansible.
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
View osx-say.el
;;; osx-say.el --- Utilizing `say' command which Mac OSX has for Emacs
;; Copyright (C) 2014 Takumi Kinjo
;; Author: Takumi Kinjo <takumi.kinjo@gmail.com>
;; Keywords: local, hypermedia
;; This file is not part of GNU Emacs.
;; This program is free software; you can redistribute it and/or modify
@kinjo
kinjo / b.py
Last active Aug 29, 2015
Example of Bpy with a plane object
View b.py
data = bpy.data.objects['Plane'].data
data.vertices.add(1)
data.vertices[4].co.x=3
data.edges.add(2)
data.edges[4].vertices[0]=3
data.edges[4].vertices[1]=4
data.edges[5].vertices[0]=1
data.edges[5].vertices[1]=4
@kinjo
kinjo / Vagrantfile
Last active Aug 29, 2015
Vagrantfile for Ruby installing.
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@kinjo
kinjo / Dockerfile
Last active Aug 29, 2015
Dockerfile using baseimage-docker for my trial.
View Dockerfile
FROM phusion/baseimage:0.9.11
ENV HOME /root
RUN /etc/my_init.d/00_regen_ssh_host_keys.sh
RUN echo /root > /etc/container_environment/HOME
Add id_rsa.pub /tmp/id_rsa.pub
RUN cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys && rm -f /tmp/id_rsa.pub
RUN apt-get update
RUN apt-get install -y autoconf bison build-essential curl git-core libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev libxml2-dev libxslt1-dev libyaml-dev sqlite3 zlib1g-dev
You can’t perform that action at this time.