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
const Slack = require ( 'slack-node' ); | |
const http = require ( 'https' ); | |
const fs = require( 'fs' ); | |
const apiToken = "YOUR_SLACK_TEAM_API_TOKEN"; | |
// interval for file download (msec) | |
const wait = 250; | |
const get = url => new Promise ( ( resolve, reject ) => { |
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
s=(a)=>{for(i=a.length-1;i>0;i--){j=Math.floor(Math.random()*(i+1));[a[i],a[j]]=[a[j],a[i]]}return a};n=()=>Math.floor(Math.random()*10);console.log(s(Array.apply(null,Array(n())).map(()=>'なん').concat(Array.apply(null,Array(n())).map(()=>'なんだ'))).concat(Array.apply(null,Array(n())).map(()=>'この')).join('')+'人生は') |
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
var processer = function(s){ | |
var score = current = i = 0 | |
,tokens = s.split('').map(function(t){return (t==='-')?'0':t}); | |
for(;;i++){ | |
if(/^\d$/.test(tokens[i])){ | |
if(!/\/|\d$/.test(tokens[++i])){ | |
throw new Error("Invalid Input"); | |
} | |
score += tokens[i] === '/' ? 10 + (tokens[i+1]==='X'?10:parseInt(tokens[i+1])) : parseInt(tokens[i]) + parseInt(tokens[i-1]); | |
} else if(tokens[i] === 'X'){ |
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
set fileencodings=utf8 | |
set encoding=utf-8 | |
set termencoding=utf-8 | |
noremap <C-j> 3+ | |
noremap <C-k> 3- | |
nnoremap Y y$ | |
noremap # :call ToggleCommentSelection()<CR> | |
nnoremap R gR | |
nnoremap <Space>l :hide bn!<CR> | |
nnoremap <Space>h :hide bp!<CR> |
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
#!ruby | |
# -*- coding: utf-8 -*- | |
require 'uri' | |
require 'open-uri' | |
require 'rubygems' | |
require 'hpricot' | |
$KCODE = 'u' | |
class Syokuzai |
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
<?php | |
class Urabuta { | |
const datetime_original_format = 'Y:m:d H:i:s'; | |
const datetime_output_format = '\'y m d'; | |
private $date_time; | |
private $image; | |
public function __construct($photo) { |
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/pkg/bin/ruby | |
require 'rss' | |
require 'uri' | |
require 'open-uri' | |
class RSS_Merge | |
def initialize(url_arr) | |
@contents = load(url_arr) |
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 ruby | |
# -*- coding: utf-8 -*- | |
require 'open-uri' | |
require 'uri' | |
require 'rubygems' | |
require 'nokogiri' | |
class Bucko |
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
module ECC | |
MOD = 1049 | |
ORD = 1033 | |
class EC_func | |
def self.l(y) | |
y**2 | |
end |
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
module ECC | |
class ECC_Point | |
def initialize(x, y) | |
@x = reduce(x, MOD) | |
@y = reduce(y, MOD) | |
end | |
def zero? | |
(@x == 0 && @y == 0) |
NewerOlder