Skip to content

Instantly share code, notes, and snippets.

@teramako
teramako / nyancat.js
Created December 8, 2011 12:16
nyancatをコンソール出力
/*
* Nyancat (SpiderMonkey version)
* https://gist.github.com/1446827
*
* @see https://github.com/klange/nyancat
*/
function start() {
function frameIterator() {
while (true) {
@mxcl
mxcl / install_homebrew.markdown
Created March 6, 2010 15:14
Installs Homebrew to /usr/local so you don't need sudo to `brew install`
@rodbegbie
rodbegbie / facebook.py
Created September 3, 2011 00:15
Hacked version of "official" (but now unsupported) Facebook Python SDK to support OAuth 2.0
#!/usr/bin/env python
#
# Copyright 2010 Facebook
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@kakutani
kakutani / reading-polished-ruby-translation.md
Last active November 3, 2021 14:06
Polished Ruby Programming翻訳査読書(のようなもの)

"Polished Ruby Programming" by Jeremy Evans

-- Build better software with more intuitive, maintainable, scalable, and high-performance Ruby code

「Rubyの磨きかた -- わかりやすくてメンテナンスしやすい、スケール可能で高性能なRubyコードでソフトウェアを上手につくろう」みたいな感じ?

https://www.packtpub.com/product/polished-ruby-programming/9781801072724

  • Publication date: June 2021
  • Publisher: Packt
  • Pages: 381
@keijiro
keijiro / 00_README.md
Last active April 6, 2022 07:26
About Xcode Manipulation API in Unity

Unity から出力される Xcode プロジェクトをカスタマイズする方法 - Xcode Manipulation API

Unity 5 には Xcode Manipulation API が標準で搭載されており、これを使うことで、Unity の出力する Xcode プロジェクトを比較的簡単にカスタマイズすることができます。

ここでは例として、Unity から出力される Xcode プロジェクトの Info.plist ファイルを書き換えてみます。

下にある XcodeProjectUpdater.cs がそれです。このファイルを Editor ディレクトリ下に放り込んでおきます。すると、ビルド時に Info.plist を書き換えて、“TestEntry” というキーに “Hello” という値を設定します。見たそのまんまのシンプルな内容です。

鍵となるのは UnityEditor.iOS.Xcode に用意されている PlistDocument と PBXProject です。これらのクラスを使うことで、plist ファイルや Xcode プロジェクトファイルの書き換えが簡単に行えるわけです。

@mkottman
mkottman / twoline_prompt.sh
Last active July 19, 2023 06:53
A two-line colored Bash prompt (PS1) with Git branch and a line decoration which adjusts automatically to the width of the terminal. Recognizes SVN, Git and Fossil version control systems and shows the current branch/revision.
# A two-line colored Bash prompt (PS1) with Git branch and a line decoration
# which adjusts automatically to the width of the terminal.
# Recognizes and shows Git, SVN and Fossil branch/revision.
# Screenshot: http://img194.imageshack.us/img194/2154/twolineprompt.png
# Michal Kottman, 2012
RESET="\[\033[0m\]"
RED="\[\033[0;31m\]"
GREEN="\[\033[01;32m\]"
BLUE="\[\033[01;34m\]"
@kddnewton
kddnewton / json.rb
Last active October 6, 2023 09:25
JSON parser with pattern matching
require "json"
struct = { "a" => 1, "b" => 2, "c" => [1, 2, 3], "d" => [{ "e" => 3 }, nil, false, true, [], {}] }
source = JSON.dump(struct)
tokens = []
index = 0
until source.empty?
tokens <<
@YusukeHosonuma
YusukeHosonuma / jojo.md
Created May 8, 2022 05:35
開発で使えるJOJOの名言集

この○○が金やちやほやされるために技術ブログを書いていると思っているのかァーッ!!

技術ブログを書いていることをアフェリエイト目的とか、PV目的だとか言われた時に。

なるほど完璧な開発プロセスっスねーーーっ不可能だという点に目をつぶればよぉ〜

一見完璧に聞こえるけど、どう考えたって上手く回らない開発プロセスの説明を受けた時に。

理解不能理解不能・・・あ、理解可能

ようやく理解できた時に。

お前は1つの修正が終わったらキチっとコミットしてから次の修正に入るだろう? 誰だってそーする。俺もそーする。

@mono0926
mono0926 / commit_message_example.md
Last active March 29, 2024 03:40
[転載] gitにおけるコミットログ/メッセージ例文集100
@voluntas
voluntas / loadtest.rst
Last active April 3, 2024 03:25
負荷試験コトハジメ