Skip to content

Instantly share code, notes, and snippets.

View tomonari-t's full-sized avatar

tomonari_takahashi tomonari-t

View GitHub Profile
@darktable
darktable / app.yaml
Created March 16, 2011 19:10
GAE: App.yaml designed for serving a static site on Google App Engine (Python). Copy your static html and files into a folder called "static" next to app.yaml. Contains a bunch of mimetype declarations from html5boilerplate's .htaccess. May not be neces
application: you-app-name-here
version: 1
runtime: python
api_version: 1
default_expiration: "30d"
handlers:
- url: /(.*\.(appcache|manifest))
mime_type: text/cache-manifest
@baijum
baijum / selenium_with_python.rst
Last active February 17, 2025 10:54
Selenium with Python
@Gab-km
Gab-km / github-flow.ja.md
Last active April 23, 2025 04:19 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@julionc
julionc / 00.howto_install_phantomjs.md
Last active March 24, 2025 17:27
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@polikeiji
polikeiji / gist:7941321
Created December 13, 2013 08:27
UIImageViewを3つ使い回して、iOSデフォルトの「写真」アプリみたいに、たくさんの写真を横向きに見ていく為のコード。 「scrollViewWillEndDragging」のUIScrollViewDelegateを使って書いた。 iOS Scroll Viewプログラミングガイドには、「scrollViewDidScroll」のデリゲートを使うって書いてあったけど、それだと早く連続で写真をめくるときの処理がうまくかけなかった。 なお、UIImageのloadImageFromPathは、自分でカテゴリを使って追加していて、非同期で画像を落としてくるスタティックメソッド。
@implement MyScrollViewDelegate
{
UIImageView *currentImageView;
UIImageView *nextImageView;
UIImageView *previousImageView;
NSInteger currentPhotoIndex;
NSArray *photos;
}
- (void)resetPhotoSlideImageViews
@uupaa
uupaa / get.path.for.node.js.md
Last active March 7, 2025 14:03
node.js で絶対パスや相対パスを取得する方法 npm __dirname

node.js でパスを取得する方法についてのメモ

$ node ~/hoge/Foo.js/a.js

を実行したときに、

  • process.argv[1] から、node コマンドに指定された a.js のパス( ~/hoge/Foo.js/a.js )を取得できます
@antiboredom
antiboredom / index.html
Created December 15, 2014 16:36
A simple example showing how to save animated gifs from p5.js sketches, using https://github.com/jnordberg/gif.js
<html>
<head>
<script src="gif.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/p5.js/0.3.11/p5.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/p5.js/0.3.11/addons/p5.dom.js"></script>
<script src="sketch.js"></script>
</head>
<body>
<p>First, allow camera access.<p><p>Then click once to start recording, and another time finish recording and make a gif.</p>
</body>
@jeremydw
jeremydw / gist:bc901de8b7e59cbeb190
Created February 27, 2015 02:06
Python webapp2 application that serves files behind HTTP Basic Auth
import webapp2
import mimetypes
import os
import time
from datetime import datetime
import base64
_here = os.path.dirname(__file__)
USERNAME = 'foo'
@nkbt
nkbt / .eslintrc.js
Last active April 1, 2025 03:07
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@chantastic
chantastic / on-jsx.markdown
Last active May 13, 2025 12:04
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't