Skip to content

Instantly share code, notes, and snippets.

View ryu1-1uyr's full-sized avatar
🐉
ryu

Ryu ryu1-1uyr

🐉
ryu
View GitHub Profile
@ryu1-1uyr
ryu1-1uyr / halfnonameFizzBuzz.js
Created April 3, 2019 03:44
ネタを仕込む
for (let num = 1 ; num < 31;num++){
console.log(
(n => (str => (x=>x||n)(n % 5 ? str : `${str}Buzz`))
((str => n % 3 ? str : `${str}Fizz`)(""))
)(num)
)
}
@ryu1-1uyr
ryu1-1uyr / prototype.js
Created April 3, 2019 02:13
メソッドチェーンっぽい書き方をしてみたかった
Number.prototype.fizz = function fizz () {
if (this % 3 == 0) {
return "Fizz"
} else {
return this
}
}
Number.prototype.buzz = function buzz () {
if (this % 5 == 0) {
@ryu1-1uyr
ryu1-1uyr / exceptionFizzBuzz.js
Created April 2, 2019 17:42
例外を使いたかった
function FizzException() {
this.name = "Fizz"
}
function BuzzException() {
this.name = "Buzz"
}
function FizzBuzzException() {
this.name = "FizzBuzz"
@ryu1-1uyr
ryu1-1uyr / kirimin.js
Last active March 7, 2019 15:32
急いで作ったのでちょっとあれだけど…ブラウザを50%とか30%にしてみてください!!実行できます!!!
const gg=-~[-~-~[]];p=console.log;__=-~-~[-~[]];const $g_ = x => {
___=(!![]+[])[-~[]]+(!![]+[])[__]+(!![]+[])[+[]] +(!![]+[])[-~[-~[]]]+
(!![]+[])[-~[]] + ([][""]+[])[-~[]] + ' \"'+'\\'+([][""] + [])[[]-[]]+
'{'+x+'}'+'\"';return ___};g=-~[]+[]+(true+true)+(__*__);gqg=__+[]+-~[];
_$_ = new TextDecoder().decode(new Uint8Array([227,129,141,227,130,138,
227,129,191,227,130,147,227,129,161,227,130,131,227,130,147])); p(_$_);
g='g'||ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg||
ggggggggggggggggggggggggggggggg||'dq$keek$qdd'||gggggggggggggggggggg||
gggggggggggggggggggg||'d$$ggggd$eyfstzzzzztujykd'||ggggggggggggggggg||
ggggggggggggggggggg||'hr_rugdhftzzzzzzzzzzzzzztfh'||gggggggggggggggg||
@ryu1-1uyr
ryu1-1uyr / .vimrc
Created February 27, 2019 22:40
移植用
" vim-bootstrap b0a75e4
"*****************************************************************************
"" Vim-PLug core
"*****************************************************************************
if has('vim_starting')
set nocompatible " Be iMproved
endif
let vimplug_exists=expand('~/.vim/autoload/plug.vim')
@ryu1-1uyr
ryu1-1uyr / botchi_b_2002.js
Created February 25, 2019 17:31
Ramda.js使ってます
const R = require('ramda');
process.stdin.resume();
process.stdin.setEncoding('utf8');
let lines = [];
let reader = require('readline').createInterface({
input: process.stdin,
output: process.stdout
@ryu1-1uyr
ryu1-1uyr / botchi_c_3001.js
Created February 25, 2019 07:39
using ramda.js
const R = require('ramda');
process.stdin.resume();
process.stdin.setEncoding('utf8');
let lines = [];
let reader = require('readline').createInterface({
input: process.stdin,
output: process.stdout
@ryu1-1uyr
ryu1-1uyr / slime.js
Created February 10, 2019 19:29
がんばった
const
$_='+'
const
_ =' '
let $=
[...Array
(15)].map(()=>[...
Array(15).fill(' ')]);$[0][7]=
$[1][6]=$[1][7]=$[1][8]=$_;$[2][6] =
$[2][7]=$[2][8]=$_;$[3][6]=$[3][7]=$[3]
@ryu1-1uyr
ryu1-1uyr / fizzbuzz.ts
Created November 26, 2018 06:55
typescriptと触れ合う
for (let i :number = 0;i<31;i++){
if (i % 15 == 0) {
console.log("fizz buzz")
} else if (i % 5 == 0) {
console.log("buzz")
} else if (i % 3 == 0) {
console.log("fizz")
} else {
console.log(i)
}
@ryu1-1uyr
ryu1-1uyr / stage3.js
Created July 18, 2018 02:57
良い感じに描きたい
const
exec =require(
'chil' +'d_process')
["exec"]; exec(
'asciify'+ ' “JavaScript”'+
' -f univers', (err, stdout, stderr)=>{
console ["log"]
(stdout); });