Skip to content

Instantly share code, notes, and snippets.

Avatar
👶
parenting

Shinichi Maeshima willnet

👶
parenting
View GitHub Profile
View how_to_use_swift_in_terminal.md

How to use swift in your terminal

setup

First, install Xcode 6 beta.

And run it.

sudo xcode-select -switch /Applications/Xcode6-Beta.app/Contents/Developer
@voluntas
voluntas / mini4w.rst
Last active Aug 29, 2015
ミニ四駆走らせたいに参加してきた
View mini4w.rst

ミニ四駆走らせたいに参加してきた

主催:@kamekoopa
日時:2014-06-07 13:00 - 19:00
場所:pixiv
コース:pixiv

概要

View gist:75b83d055563e3008909

ゆるデ部室

第1回meetupによせて

初めましての方もそうでない方もこんばんは。

合同会社qumuあらため合同会社テンマド(10mado, LLC)の山岡(@hiro_y)です。

この中にフリーランスの方、どれぐらいいらっしゃるでしょうか。 また、例えば就業後とか週末とか、自宅じゃない作業場所がほしい人は?

@tompng
tompng / n1_safe.rb
Last active Aug 29, 2015
railsでn+1クエリとか考えたくないし全自動でどうにかしてほしい https://github.com/tompng/n1_safe に移動
View n1_safe.rb
##controller
def index
#includesとかはせずにとりあえずn1_safeを付けておく
@posts = Post.all.n1_safe
end
#Post load (X.Xms) SELECT "posts".* FROM "posts"
##view
#なにも考えずにeachとかまわしまくると、必要になった時にまとめてN+1を回避しつつloadされる感じ
<% @posts.each do |post| %>
@ches
ches / .pryrc
Created Aug 29, 2011
Enable Hirb in Pry, and hack disable/enable to work in-session
View .pryrc
begin
require 'hirb'
rescue LoadError
# Missing goodies, bummer
end
if defined? Hirb
# Dirty hack to support in-session Hirb.disable/enable
Hirb::View.instance_eval do
def enable_output_method
@sharl
sharl / emacs.rb
Created Feb 24, 2012
Yet Another Emacs 23.4 homebrew Formula (ATOK support? unconfirmed)
View emacs.rb
require 'formula'
class Emacs < Formula
url 'http://ftp.gnu.org/pub/gnu/emacs/emacs-23.4.tar.bz2'
md5 '070c68ad8e3c31fb3cb2414feaf5e6f0'
homepage 'http://www.gnu.org/software/emacs/'
if ARGV.include? "--use-git-head"
head 'git://git.sv.gnu.org/emacs.git'
else
@jachenry
jachenry / template_handler.rb
Created Oct 11, 2012
SCSS Template Handler
View template_handler.rb
require 'sass/plugin'
module Sass
module Rails
class TemplateHandler
class_attribute :default_format
self.default_format = Mime::CSS
def initialize
end
@jugyo
jugyo / to_factory_girl.rb
Created Nov 7, 2012
ActiveRecord extension to print FactoryGirl definition!
View to_factory_girl.rb
class ActiveRecord::Base
# Usage:
#
# > puts User.first.to_factory_girl
# FactoryGirl.define do
# factory :user do
# ...
# end
# end
# # Usage: FactoryGirl.create(:user, ...)
View transcribed-the-miyagawas-podcast-ep1.md

Tatsuhiko Miyagawa’s Podcast ep1

最近ブログ書いてますよね #00:00:00.0#

miyagawa naoyaさん、最近は結構ブログが活発になってきている感じですね。
naoya はいはい、そうですよね。
miyagawa なんか、心境の変化があったんですか。
naoya 心境の変化(笑)
miyagawa (笑)
naoya いやずっとドラクエしかしてなかったんですけど(笑)

View ruby5-383.md

#383 - July 2, 2013

Olivier Lacan, Tony Winn

One Liner Webserver (0:30-)

Nobuyoshi Nakada showed a beautifully simple way to start a web server within the present working directory by only using Ruby. ruby -run -e httpd . -p 5000

  • I know this is the(?) exchange between Aaron Patterson and Nobuyoshi Nakada, both Ruby core contirbutors yesterday on Twitter, Nobuyoshi showed beautifully simple way to start a web server within the present working directory by only using ruby.
  • You mean something like that single-line Python script that was floating(?) around?
  • Yeah, exactly. All you need to do is call ruby -run -e httpd . -p 5000. That will start the server using WEBrick, which comes with(?) the Ruby Standard Library, and you can see the server running at localhost:5000 in your brouser(?), if you have an index.html file in that directory, it will show up in your browser.