Skip to content

Instantly share code, notes, and snippets.

@0mg
Created July 16, 2010 15:56
Show Gist options
  • Select an option

  • Save 0mg/478530 to your computer and use it in GitHub Desktop.

Select an option

Save 0mg/478530 to your computer and use it in GitHub Desktop.
javascript:
for(z=[4228151417,67404933,2080670725,67405029,67404933,83654777],
f=i="";m=z[i++];f+="\n")for(;m>>>=1;)f+=m&1?"●":"○";alert(f)
/* 0. ペイントツール */
javascript:
(function(_){return _.map(function(_){
return parseInt(_.split("").reverse().join(""),2)<<1|1})})(
/* 1. ここに 0,1 で絵を描く */
/* 上限 :
"1111111111111111111111111111111" */
[
"011110011110111100110",
"111111010010100001001",
"111111011110111101000",
"111111010100100001000",
"111111010010100001001",
"011110010010111100110"
]
)
/* 2. 実行すると返ってくる → [1699645,2369919,388991,271743,2369919,1698109] */
/* 3. 下記 z に代入する */
javascript:
for(z=[1699645,2369919,388991,271743,2369919,1698109],
f=i="";m=z[i++];f+="\n")for(;m>>>=1;)f+=m&1?"●":"○";alert(f)
/* 4. 実行すると…… */
/*
○●●●●○○●●●●○●●●●○○●●
●●●●●●○●○○●○●○○○○●○○●
●●●●●●○●●●●○●●●●○●
●●●●●●○●○●○○●○○○○●
●●●●●●○●○○●○●○○○○●○○●
○●●●●○○●○○●○●●●●○○●●
*/
/* どーん */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment