Skip to content

Instantly share code, notes, and snippets.

View nyarla's full-sized avatar
🐱

OKAMURA Naoki aka nyarla / kalaclista nyarla

🐱
View GitHub Profile
@DanielWright
DanielWright / README.md
Created November 16, 2011 18:51
Simple font-smoothing in Internet Explorer

The filter and zoom rules in the sample stylesheet above will apply a smoothing/blurring effect to text elements. In the sample stylesheet, these rules are applied to all headers, paragraphs, list items, and table cells, but in practice, you will want to tailor the application of the smoothing effect to only those elements rendering with significant aliasing.

Nota Bene: the filter appears to place an overflow: hidden-style block around the elements being smoothed, so do not apply these rules directly to elements that need to scroll, or which contain absolutely positioned elements that appear outside the boundaries of the element itself.

@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@dz0ny
dz0ny / 99java
Created July 7, 2012 10:23
Install java,flash,mp3,mp4 to Chromium OS
## Setup java
if [ `uname -m` == 'x86_64' ]; then
PATH="/usr/lib64/jvm/java-7-oracle/jre/bin/"
JAVA_HOME="/usr/lib64/jvm/java-7-oracle/"
else
PATH="/usr/lib/jvm/java-7-oracle/jre/bin/"
JAVA_HOME="/usr/lib/jvm/java-7-oracle/"
fi
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@mala
mala / gist:5107120
Last active March 19, 2020 01:41
TwitterのOAuthの問題の補足とか

https://gist.github.com/mala/5062931

の続き。

Twitterの人に色々と問題点は伝えたんだけど、これからOAuthのサーバー書く人や、クライアント書く人が似たような問題を起こさないようにするために、どうすればいいのかについて簡単に書きます。既存の実装真似して作るとうっかりひどい目にあう。

自分は意図的に「Twitterの脆弱性」という表現を使わないように気を使っていて、それはクライアントアプリ側の責任もあるからなのだけれども、安全に実装するための方法がわかりにくかったり誤解を招きやすかったり、Twitterに買収されているTweetDeckにも問題があったりしたので、それはやっぱりTwitter側の責任の比重が大きいとは思う。とはいっても別に責任を追求したかったり◯◯はクソだといったことを言いたいわけではなく、誰が悪いとか言う以前に、複合的な要因によって問題が起きるときには原因を正しく理解する必要があると思う。

そもそも何を担保に安全性を保証しているのか

  • サーバー側で秘密の鍵を持っている(それが無いとアクセストークンを取得できない or 使えない)
#!/bin/bash
TARGET_VERSION=$1
LOCATION=$2
if [ "x"$TARGET_VERSION = "x-h" -o "x"$TARGET_VERSION = "x--help" -o "x"$LOCATION = "x" ]; then
echo "[usage] perl-install VERSION LOCATION"
echo " ex: perl-install 5.16.3 ~/local/perl-5.16"
exit 0
fi
#!/bin/bash
TARGET_VERSION=$1
LOCATION=$2
if [ "x"$TARGET_VERSION = "x-h" -o "x"$TARGET_VERSION = "x--help" -o "x"$LOCATION = "x" ]; then
echo "[usage] ruby-install VERSION LOCATION"
echo " ex: ruby-install 1.9.3-p392 ~/local/ruby-1.9.3"
exit 0
fi
#!/bin/bash
TARGET_VERSION=$1
LOCATION=$2
ARCH=$3
if [ "x"$TARGET_VERSION = "x-h" -o "x"$TARGET_VERSION = "x--help" -o "x"$LOCATION = "x" ]; then
echo "[usage] node-install VERSION LOCATION [arch]"
echo " ex: node-install v0.10.1 ~/local/node-v0.10"
echo " ex: node-install v0.10.1 ~/local/node-v0.10 darwin-x86"
@rcrowley
rcrowley / grace.go
Last active March 1, 2023 16:06
Graceful stop in Go
package main
import (
"log"
"net"
"os"
"os/signal"
"sync"
"syscall"
"time"