Skip to content

Instantly share code, notes, and snippets.

View morishin's full-sized avatar
🦍
ウホホ

Shintaro Morikawa morishin

🦍
ウホホ
View GitHub Profile
@namutaka
namutaka / smooth_scroll_mod.vim
Created January 23, 2011 10:53
[vim]Smooth scroll modified.
" Smooth Scrooll modified
" 2011/01/23
" [original] http://www.vim.org/scripts/script.php?script_id=1601
"
" * The global variable g:scroll_skip_line_size is the scroll lines by one time.
" * The scroll is stopped when reaching the top and bottom of the buffer.
"
" Smooth Scroll
"
@tikitikipoo
tikitikipoo / gist:1812628
Created February 13, 2012 01:52
UIToolbarに背景画像を設定。iOS5とiOS4に対応する方法。
// 出所:http://stackoverflow.com/questions/6341503/uinavigationbar-custom-background-image
// 関連:http://www.mladjanantic.com/setting-custom-background-for-uinavigationbar-what-will-work-on-ios5-and-ios4-too/
toolBar = [[UIToolbar alloc] initWithFrame:toolBarBounds];
[toolBar sizeToFit];
// set BackgroudImage
if ([[[UIDevice currentDevice] systemVersion] floatValue] > 4.9) {
//iOS 5
@tcnksm
tcnksm / docker_cheat.md
Last active August 5, 2021 03:59 — forked from wsargent/docker_cheat.md
Docker 虎の巻

Docker 虎の巻

何故Dockerを使うべきか

Why Should I Care (For Developers)

"Dockerが面白いのはシンプルな環境に隔離性と再現性をもたらしてくれることだ.ランタイムの環境を一度作れば、パッケージにして別のマシンでも再利用することできる.さらに,すべてはホスト内の隔離された環境で行われる(VMのように).最も素晴らしい点は,シンプルかつ高速であることだ."

@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@krrrr38
krrrr38 / playvm
Last active August 29, 2015 13:58
play version manager based on svm(https://github.com/yuroyoro/svm)
#!/usr/bin/env bash
# Copyright (c) 2011 Tomohito Ozaki(yuroyoro)
# 2014 Ken Kaizu(krrrr38)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
@staltz
staltz / introrx.md
Last active July 15, 2024 15:43
The introduction to Reactive Programming you've been missing
@lotz84
lotz84 / Simple markdown editor
Last active October 12, 2017 18:16
Simple markdown editor on browser, which extends "data:text/html,<html contenteditable>".
data:text/html,<title>md</title><script src='http://cdnjs.cloudflare.com/ajax/libs/marked/0.3.2/marked.min.js'></script><style>#a,#b{width:50%;height:100%;float:left;outline:none}@media print{#a{display:none;}}</style><div id='a' contenteditable>md</div><div id='b'></div><script>var c=function(a){return document.getElementById(a)};c('a').addEventListener('keydown',function(e){if(e.keyCode==9){e.preventDefault();document.execCommand('insertText',![],'\t');return ![];}setTimeout(function(){c('b').innerHTML=marked(c('a').innerText)},0)})</script>
@lotz84
lotz84 / Layout.swift
Last active August 29, 2015 14:07
Table layout in Swift
import UIKit
infix operator ||| { associativity left precedence 80 }
func ||| (lhs: Layout.Panel, rhs: Layout.Panel) -> Layout.Panel {
return Layout.Panel(forkType: .Horizontal , panel1: lhs, panel2: rhs)
}
infix operator --- { associativity left precedence 80 }
func --- (lhs: Layout.Panel, rhs: Layout.Panel) -> Layout.Panel {
return Layout.Panel(forkType: .Vertical , panel1: lhs, panel2: rhs)
@jiaaro
jiaaro / installing_pyaudio.md
Last active May 2, 2024 10:15
How to install PyAudio into a VirtualEnv on Mac OS X 10.10

Install portaudio using homebrew (or method of your choice)

brew install portaudio

create $HOME/.pydistutils.cfg using the include and lib directories of your portaudio install:

[build_ext]
#! /usr/bin/env python
# -*- coding:utf-8 -*-
import concurrent.futures
import sys
import subprocess
import time
from collections import defaultdict
from data import sentences