Skip to content

Instantly share code, notes, and snippets.

View ychubachi's full-sized avatar

Yoshihide Chubachi ychubachi

View GitHub Profile
@3dd13
3dd13 / generate_ssh_keys.rb
Created January 20, 2011 16:59
chef recipe to generate ssh key for a user
define :generate_ssh_keys, :user_account => nil do
username = params[:user_account]
raise ":user_account should be provided." if username.nil?
Chef::Log.debug("generate ssh skys for #{username}.")
execute "generate ssh skys for #{username}." do
user username
creates "/home/#{username}/.ssh/id_rsa.pub"
@rhiguchi
rhiguchi / VBACodeExporter.vba
Created April 11, 2011 06:48
Excel VBA のコードを出力する。文字コードはUTF-8(BOM無し)に変換される
Option Explicit
Private exportSelf As Boolean
Public Const MODULE_NAME_SPACE As String = "VBACodeExporter"
Private Enum ComponentType
STANDARD_MODULE = 1
CLASS_MODULE = 2
USER_FORM = 3
DOCUMENT_MODULE = 100
@hayeshaugen
hayeshaugen / gist:994453
Created May 27, 2011 01:07
Android SDK headless install for Linux Jenkins CI
# sudo su -
# apt-get install openjdk-6-jdk
# apt-get install ant1.8
Source control, in this case svn:
# apt-get install subversion
Install Jenkins
@acoulton
acoulton / github-connect.sh
Created March 4, 2012 01:22
Create and register an SSH key for your github account
#!/bin/bash
# github-connect.sh
# -----------------
# Copyright 2012 Andrew Coulton - released under the BSD licence
#
# A simple command line script to set up and register an SSH key against a
# user's github account - for example when provisioning a new virtual
# machine for a developer.
#
@mono0x
mono0x / webbrowser.rb
Created March 6, 2012 13:08
Open URI with default web browser
# -*- coding: utf-8 -*-
require 'uri'
class WebBrowser
def self.open(uri)
uri = URI.parse(uri.to_s)
unless %w[ http https ftp file ].include?(uri.scheme)
raise ArgumentError
end
@jgarber
jgarber / MIT-LICENSE.txt
Created April 4, 2012 14:57
Responsive video
Copyright (c) 2011 ZURB, http://www.zurb.com/
@f440
f440 / Gemfile
Created June 3, 2012 09:51
guard-livereload for sphinx
source 'https://rubygems.org'
gem 'guard-livereload'
gem 'guard-shell'
gem 'foreman'
@Gab-km
Gab-km / github-flow.ja.md
Last active October 29, 2024 10:17 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@smd877
smd877 / CommonUtilities.java
Created September 27, 2012 09:47
GCMのClientDemoを簡略化
package com.google.android.gcm.demo.app;
import android.content.Context;
import android.content.Intent;
public final class CommonUtilities {
/** サードパーティのID登録/解除用URL */
static final String SERVER_URL = "http://localhost:8080/jsp";
@lukewpatterson
lukewpatterson / gist:4242707
Created December 9, 2012 00:24
squeezing private SSH key into .travis.yml file
Tricks to add encrypted private SSH key to .travis.yml file
To encrypt the private SSH key into the "-secure: xxxxx....." lines to place in the .travis.yml file, generate a deploy key then run: (to see what the encrypted data looks like, see an example here: https://github.com/veewee-community/veewee-push/blob/486102e6f508214b04414074c921475e5943f682/.travis.yml#L21
base64 --wrap=0 ~/.ssh/id_rsa > ~/.ssh/id_rsa_base64
ENCRYPTION_FILTER="echo \$(echo \"-\")\$(travis encrypt veewee-community/veewee-push \"\$FILE='\`cat $FILE\`'\" | grep secure:)"
split --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" ~/.ssh/id_rsa_base64 id_rsa_