Skip to content

Instantly share code, notes, and snippets.

View harai's full-sized avatar

Harai Akihiro harai

  • Tsu, Mie, Japan
View GitHub Profile
#!/usr/bin/env ruby
##
# script/spec_server_irb
require 'drb'
require 'irb'
begin
begin
@jugyo
jugyo / to_factory_girl.rb
Created November 7, 2012 05:54
ActiveRecord extension to print FactoryGirl definition!
class ActiveRecord::Base
# Usage:
#
# > puts User.first.to_factory_girl
# FactoryGirl.define do
# factory :user do
# ...
# end
# end
# # Usage: FactoryGirl.create(:user, ...)
@ruo91
ruo91 / hadoop-2.2.0.txt
Created October 25, 2013 13:29
Hadoop 2.2.0 - warning: You have loaded library /home/hadoop/2.2.0/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard.
[hadoop@dev ~]$ start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
13/10/25 22:21:07 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /home/hadoop/2.2.0/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
localhost]
sed: -e expression #1, char 6: unknown option to `s'
HotSpot(TM): ssh: Could not resolve hostname HotSpot(TM): Name or service not known
64-Bit: ssh: Could not resolve hostname 64-Bit: Name or service not known
Java: ssh: Could not resolve hostname Java: Name or service not known
@Mihailoff
Mihailoff / AnObj.php
Created September 11, 2012 18:17
PHP Anonymous Object
<?php
/**
* PHP Anonymous Object
*/
class AnObj
{
protected $methods = array();
public function __construct(array $options)
@StevenMaude
StevenMaude / sha256frompubkey.py
Last active August 14, 2022 04:06
Generate SHA256 fingerprint from a public key
#!/usr/bin/python
# coding=utf-8
# sha256frompubkey.py: Displays SHA256 fingerprint of public key in Python 2/3.
# Modified by Steven Maude from
# https://github.com/joyent/python-manta/blob/4de7445277c0971c7ff43ef246018d055ef21d20/manta/auth.py
# MIT licence.
# Usage: obtain a public key using ssh-keyscan <host> > key.pub