Skip to content

Instantly share code, notes, and snippets.

View houkanshan's full-sized avatar
👾
My game is Mai and I like making names

Mai Hou houkanshan

👾
My game is Mai and I like making names
View GitHub Profile
#!/usr/bin/env /usr/local/bin/node
var http = require('http')
var icon = '♒︎'
function get(url) {
return new Promise((resolve, reject) => {
return http.get(url, res => {
var body = ''
body {
background: url(javascript:alert('haha'));
}
@houkanshan
houkanshan / alpha_by_camera_distance.shader
Last active December 4, 2015 14:27
alpha_by_camera_distance.shader
Shader "Custom/Transparent/DiffuseRoad" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
_MinDistance ("Min Distance", Float) = 3.2
_MaxDistance ("Max Distance", Float) = 4.0
}
SubShader {
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
@"i386" on 32-bit Simulator
@"x86_64" on 64-bit Simulator
@"iPod1,1" on iPod Touch
@"iPod2,1" on iPod Touch Second Generation
@"iPod3,1" on iPod Touch Third Generation
@"iPod4,1" on iPod Touch Fourth Generation
@"iPod7,1" on iPod Touch 6th Generation
@"iPhone1,1" on iPhone
@"iPhone1,2" on iPhone 3G
@"iPhone2,1" on iPhone 3GS
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This script helps removing Git branches.
# Run it from a git repo dir. It will open the Git branches list
# in your favorite editor. Delete some branches from the list.
# Save and close the file. The script applies the changes to the repo.
from subprocess import call, Popen, PIPE
from os import getenv
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<style>
@font-face {
font-family: 'arkpunctuation';
src: url("/iconic-punctuation/DroidSerif.eot");
src: url("/iconic-punctuation/DroidSerif.eot#iefix") format('embedded-opentype'), url("/iconic-punctuation/DroidSerif.woff") format('woff'), url("/iconic-punctuation/arkpunctuation_v2.ttf") format('truetype'), url("/iconic-punctuation/arkpunctuation_v2.svg#arkicons") format('svg');
@houkanshan
houkanshan / CJK
Last active August 29, 2015 14:10
Ai 复合字体配置
typ1ÄpCFMAØd¿®"CID Ød¿®L∆RLBLØd¿®4HnameØd¿® |MG∞Z%!PS-Adobe-3.0 Resource-Font
%ADOResourceSubCategory: RearrangedFont
%%DocumentNeededResources: ProcSet CIDInit
%%+ Font KozGoPr6N-Regular-UniJIS-UTF16-H
%%+ Font KozGoPr6N-Regular-UniJIS-UTF16-H
%%+ Font KozGoPr6N-Regular-UniJIS-UTF16-H
%%+ Font KozGoPr6N-Regular-UniJIS-UTF16-H
%%+ Font MyriadPro-Regular-UniJIS-UTF16-H
%%+ Font MyriadPro-Regular-UniJIS-UTF16-H
%%+ Font HiraginoSansGB-W3-UniCNS-UTF16-H
text-align: justify;
text-justify: inter-ideograph;
-ms-text-justify: inter-ideograph;
text-autospace: ideograph-alpha;
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
char_group .close {
float: none;
font-size: inhert;
font-weight: inhert;
line-height: inhert;
color: inhert;
text-shadow: inhert;
filter: inhert;
opacity: inhert;
}
function key(c) {
$('#drums [data-pitch='+(c - 1)+']').click()
}
setInterval(play, 200)
var list1 = [[3,4], [], [4], [], [2], [] , [4], [2], [4], [2], [1], [], [2, [4]],[], [4], []]
var list2 = [[1, 3], [4], [2, 4], [4], [1, 4], [1, 4], [2, 4], [4]]
var i = 0;
list = list1
function play(){
i = i % list.length