Skip to content

Instantly share code, notes, and snippets.

View yuyalush's full-sized avatar

Yuya Yoshida yuyalush

View GitHub Profile
@yuyalush
yuyalush / file0.txt
Created July 15, 2013 09:37
大量のスクリーンショットを並べるブログを効率良く書く方法 ref: http://qiita.com/yuya_lush/items/4df099d1beda205d4bee
$ brew install pngquant
@yuyalush
yuyalush / setup
Last active December 16, 2015 23:59
1. apt-get update apt-get upgrade apt-get install curl 2. curl -L http://bit.ly/setup_rb20 | bash
apt-get -y install build-essential git libssl-dev zlib1g-dev libreadline-dev zlib1g-dev libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt-dev
echo 'install: --no-ri --no-rdoc' >> ~/.gemrc
echo 'update: --no-ri --no-rdoc' >> ~/.gemrc
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec /bin/bash -l
git clone https://github.com/sstephenson/ruby-build.git
cd ruby-build/
./install.sh
@yuyalush
yuyalush / raspberry pi
Created April 15, 2013 15:31
Raspberry Piに流したコマンドの履歴
sudo apt-get update
sudo apt-get install zsh
chsh
sudo apt-get install git
sudo apt-get install ttf-takao-mincho
sudo apt-get install ttf-takao
passwd
sudo apt-get install vim
@yuyalush
yuyalush / Gemfile
Last active December 16, 2015 05:09
knife-soloを使わないでやってみた
source 'https://rubygems.org'
gem 'rails', '3.2.13'
gem 'sqlite3'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
@yuyalush
yuyalush / file0.txt
Created March 14, 2013 08:04
Padrino使ってQRcodeを表示させる ref: http://qiita.com/items/61189db4743d8cd63ded
$ padrino g project testqr -e slim
$ cd testqr
$ bundle install
@yuyalush
yuyalush / application.haml
Last active December 14, 2015 01:59
日経Linux ソースコード
!!! Strict
%html
%head
%title= [@title, "Ruby2.0 blog"].compact.join(" | ")
= stylesheet_link_tag 'reset', 'application'
= javascript_include_tag 'jquery', 'application'
= yield_content :include
%body
#header
%h1 Sample Padrino Blog
@yuyalush
yuyalush / upload_file.rb
Created January 26, 2013 07:57
ニフティクラウドストレージへ公開ファイルをアップロードする手抜きスクリプト。 NCSはS3互換なので、ライブラリがそのまま使えました。便利〜。 <注意> 西日本リージョンにバケットがある前提です。(東日本にバケットにあるときはエンドポイントを変えてください。)
#
# Nifty Cloud Strage fileuploader
# docs : http://docs.aws.amazon.com/AWSRubySDK/latest/frames.html
#
require "aws"
ncs = AWS::S3.new(
access_key_id: "ACCESS_KEY",
secret_access_key: "SECRET_ACCESS_KEY",
s3_endpoint: "west-1-ncss.nifty.com"
)
@yuyalush
yuyalush / simplenote.js
Created January 29, 2012 14:53 — forked from kirel/simplenote.js
SimpleNote API via node.js
var request = require('request'),
querystring = require('querystring');
var Note = function(key){
this.key = key;
}
Note.prototype = new process.EventEmitter();
var SimpleNote = function(email, passwd){
this.email = email;
@yuyalush
yuyalush / r.rb
Created January 29, 2012 14:53 — forked from kastner/r.rb
# Simple SimpleNote client library
# Erik Kastner 2010-07-18
require 'rubygems'
require 'rest_client'
require 'base64'
require 'json'
class SimpleNote
def initialize(email, password)
@yuyalush
yuyalush / rvm2rbenv.txt
Created January 22, 2012 21:41 — forked from brentertz/rvm2rbenv.txt
Switch from RVM to RBENV
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew doctor
brew update
## Install ###################################################################