Skip to content

Instantly share code, notes, and snippets.

View tbaba's full-sized avatar
🏠
Working from home

Tatsuro Baba tbaba

🏠
Working from home
View GitHub Profile
@mizchi
mizchi / how-hooks-work.md
Last active March 28, 2024 07:10
(翻訳) React Hooks は魔法ではなく、ただの配列だ

(翻訳) React Hooks は魔法ではなく、ただの配列だ

この記事は https://medium.com/@ryardley/react-hooks-not-magic-just-arrays-cd4f1857236e の日本語訳です。途中で力尽きて雑な翻訳になってる箇所がいくつかあります。


どのように Hooks が動いているか

私は、新しい Hooks の API の "magic" な挙動に悩んでいる人が結構いると聞いています。なのでこの構文の提案が、少なくとも表面的なレベルではどう動いているか、解説してみようと思います。

@joerichsen
joerichsen / parallel_assets_compiler.gemspec
Created June 5, 2012 06:23
Microgem for compiling assets in parallel
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'parallel_assets_compiler'
s.version = '0.2.0'
s.platform = Gem::Platform::RUBY
s.author = 'Jørgen Orehøj Erichsen'
s.email = 'joe@erichsen.net'
s.summary = 'Compile assets in parallel'
s.description = 'Compile assets in parallel to speed up deployment'
@cjolly
cjolly / pg.sh
Last active July 25, 2022 20:16
Use homebrew to upgrade to postgres on OSX
newpg=9.6.1 # set to new PG version number
oldpg=`pg_config --version | cut -d' ' -f2`
# PG 96. upgrades the readline to v7, which breaks anything linked against readline v6, like ruby via ruby-build.
# I *think* this should prevent it from installing v7. But if weird shit happens with various rubies,
# you'll have to reinstall them.
brew pin readline
# Stop current Postgres server
brew services stop postgresql
@keikubo
keikubo / README.md
Created March 20, 2012 01:38
Nginx + Unicorn for Rails on Rackhub

Nginx + Unicorn for Rails on Rackhub

Description:

This script enables you to launch your Rails application in production environment (port:80) with Nginx and Unicorn.

Installation:

Please make sure that your Gemfile in your rails application includes unicorn.

@ngs
ngs / mroonga.mkdn
Created October 17, 2011 19:22
installing mroonga on Mac OS X Lion

Install MySQL + MeCab + Groonga using Homebrew

$ brew install mysql
$ brew install mecab
$ brew install groonga
$ cd /usr/local
$ sudo ln -s Cellar/mysql/5.5.15 mysql

Clone mroonga from Github

@nov
nov / fb_graph_2_1_1.rb
Created September 7, 2011 12:33
fb_graph 2.1.1 new features
# Friend Requests
me = FbGraph::User.me(USER_ACCESS_TOKEN)
me.friend_requests # => Array of FbGraph::FriendRequest
# Checking if a user is an admin of a Page
user = FbGraph::User.new('matake')
page = FbGraph::Page.new('FbGraph')
page.admin?(user, :access_token => PAGE_ACCESS_TOKEN) # => true/false
@tmacedo
tmacedo / gist:966579
Created May 11, 2011 14:45
jenkins skype group chat notification
diff --git a/src/main/java/hudson/plugins/skype/im/transport/SkypeIMConnection.java b/src/main/java/hudson/plugins/skype/im/transport/SkypeIMConnection.java
index 744e4b0..7071069 100644
--- a/src/main/java/hudson/plugins/skype/im/transport/SkypeIMConnection.java
+++ b/src/main/java/hudson/plugins/skype/im/transport/SkypeIMConnection.java
@@ -20,6 +20,7 @@ import hudson.plugins.im.IMPresence;
import hudson.plugins.im.bot.Bot;
import hudson.plugins.im.tools.ExceptionHelper;
import hudson.plugins.skype.im.transport.callables.SkypeChatCallable;
+import hudson.plugins.skype.im.transport.callables.SkypeGroupChatCallable;
import hudson.plugins.skype.im.transport.callables.SkypeSetupCallable;
@mikhailov
mikhailov / installation.sh
Created November 23, 2010 15:18
nginx+passenger (real production config)
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776
$ cd /usr/src
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz