Skip to content

Instantly share code, notes, and snippets.

View tokida's full-sized avatar

Hideaki Tokida tokida

View GitHub Profile
@tokida
tokida / 0_reuse_code.js
Created March 22, 2014 08:38
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?php
include('softlayer-api-php-client/SoftLayer/SoapClient.class.php');
$apiUser = '';
$apiKey = '';
$serverId = ;
$serverClient = SoftLayer_SoapClient::getClient('SoftLayer_Hardware_Server', $serverId, $apiUser, $apiKey);
" Startify
" 起動時の画面の設定
" startifyのヘッダー部分に表示する文字列を設定する(dateコマンドを実行して日付を設定している)
let g:startify_custom_header =
\ map(split(system('date'), '\n'), '" ". v:val') + ['','']
let g:startify_files_number = 10
" デフォルトだと、最近使ったファイルの先頭は数字なので、使用するアルファベットを指定
" let g:startify_custom_indices = ['f', 'g', 'h', 'r', 'i', 'o', 'b']
" よく使うファイルをブックマークとして登録しておく
let g:startify_bookmarks = [
#=======================================================================
# bootstrap4Ubuntu.sh on SoftLayer
#=======================================================================
sudo apt-get update
sudo apt-get upgrade
# Install Util
sudo apt-get install git -y
sudo apt-get install curl -y
# -*- 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|
config.vm.box = "dummy"
config.vm.box_url = "https://github.com/audiolize/vagrant-softlayer/raw/master/dummy.box"
config.vm.synced_folder ".", "/vagrant", type: "rsync"
*** tmux-1.9a.orig/utf8.c 2014-02-23 05:48:37.000000000 +0900
--- tmux-1.9a/utf8.c 2014-07-06 00:43:50.000000000 +0900
***************
*** 22,27 ****
--- 22,32 ----
#include "tmux.h"
+
+ #define _XOPEN_SOURCE
@tokida
tokida / Dockerfiles
Created August 1, 2014 04:55
Docker registry with swift driver
# start from a registry release known to work
FROM registry:0.7.3
# get the swift driver for the registry
RUN pip install docker-registry-driver-swift==0.0.1
# SoftLayer uses v1 auth and the sample config doesn't have an option
# for it so inject one
RUN sed -i '91i swift_auth_version: _env:OS_AUTH_VERSION' /docker-registry/config/config_sample.yml
#Requires -Version 3.0
#-- Prerequisite OS Setting Module Functions --#
function New-ValentiaPSRemotingFirewallRule
{
<#
.SYNOPSIS
function Install-JapaneseUI
{
param
(
[parameter(
mandatory = 1,
position = 0)]
[ValidateSet("Windows2012","Windows2012R2")]
[string]
$targetOSVersion,