This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clang -dynamiclib -framework AppKit patch.m -arch i386 -arch x86_64 -o patch.dylib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dis | |
def while_1(): | |
while 1: | |
pass | |
def while_true(): | |
while True: | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query=vim | |
time bash -c "for i in {0..1000}; do which $query; done >/dev/null 2>&1" | |
time bash -c "for i in {0..1000}; do command -v $query; done >/dev/null 2>&1" | |
time bash -c "for i in {0..1000}; do type $query; done >/dev/null 2>&1" | |
time bash -c "for i in {0..1000}; do hash $query; done 2>/dev/null" | |
time zsh -c "for i in {0..100000}; do which $query; done >/dev/null 2>&1" | |
time zsh -c "for i in {0..100000}; do command -v $query; done >/dev/null 2>&1" | |
time zsh -c "for i in {0..100000}; do type $query; done >/dev/null 2>&1" | |
time zsh -c "for i in {0..100000}; do hash $query; done 2>/dev/null" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
import calendar | |
import datetime | |
import time | |
import pytz | |
OS X の標準の Python 環境は Python 3 が入っていないので Homebrew 等でインストールしましょう.
http://brew.sh/index_ja.html を参考に
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define N 1024 | |
int main(void) { | |
int a[N][N]; | |
int b[N][N]; | |
int c[N][N]; | |
for (int i = 0; i < N; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int sum(int n) { | |
int acc = 0; | |
for (int i = 0; i <= n; i++) { | |
acc += i; | |
} | |
return acc; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Example of Proper Tail Calls</title> | |
</head> | |
<body> | |
<h1>Example of Proper Tail Calls</h1> | |
<p> | |
Please open console. If your web browser supports proper tail calls, it shows "It works!". |
This is an unofficial fork of OchaCaml for Homebrew Formula.
This Gist is not maintained. See ymyzk/ochacaml for latest information.
- Character encoding: EUC-JP -> UTF-8
- Generate a diff file using
git diff
OlderNewer