Skip to content

Instantly share code, notes, and snippets.

:shipit:
I'm curious

Koki Takahashi hakatashi

:shipit:
I'm curious
Block or report user

Report or block hakatashi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View dot-tracer.cpp
#include <iostream>
#include <windows.h>
#include <stdlib.h>
#include "EasyBMP.h" // http://easybmp.sourceforge.net/
using namespace std;
INPUT input[5][24];
int complete = 0;
int colno = 0;
@hakatashi
hakatashi / helloworld.js
Created Apr 27, 2014
#実用的なhelloworld
View helloworld.js
String.prototype.capitalize = function() {
return this.charAt(0).toUpperCase() + this.slice(1);
};
var Greet = function(greeting, objection) {
this.greeting = greeting || 'hello';
this.objection = objection || 'world';
this.do = function() {
console.log((this.greeting + ', ' + this.objection + '!').capitalize());
};
View AutoHotKey.ahk
#PgUp::Volume_Up
#PgDn::Volume_Down
Pause::Media_Play_Pause
ScrollLock & h::send {Left}
ScrollLock & j::send {Down}
ScrollLock & k::send {Up}
ScrollLock & l::send {Right}
ScrollLock & y::send {Home}
@hakatashi
hakatashi / excitinggame.c
Created May 25, 2014
What's happening here when I enter invalid numbers like 'a'?????
View excitinggame.c
#include <stdio.h>
int main() {
int number;
while (1) {
printf("Enter your number: ");
scanf("%d", &number);
if (number > 10) {
View typhoon.js
var WebSocket = require('websocket').client;
var request = require('request');
var cheerio = require('cheerio');
var stripJsonComments = require('strip-json-comments');
var moment = require('moment-timezone');
var fs = require('fs');
var hostname = 'ws://typhoon.yumetaro.info/websocket';
var ws = new WebSocket();
View reorganize.js
require('sugar');
var fs = require('fs');
var filenames = fs.readdirSync('.');
filenames.forEach(function(filename) {
if (filename.endsWith('.png') || filename.endsWith('.jpg')) {
fs.stat(filename, function(err, stat) {
var time = new Date(Math.min(stat.mtime, stat.ctime, stat.atime));
var timeString = time.getFullYear() + '-' + (time.getMonth() + 1).toString().padLeft(2, '0');
fs.exists(timeString, function (exists) {
View jquery-1.11.1.pyon.js
!function(こころ,いつも){"object"==typeof module&&"object"==typeof module.exports?module.exports=こころ.document?いつも(こころ,!0):function(こころ){if(!こころ.document)throw new Error("jQuery requires a window with a document");return いつも(こころ)}:いつも(こころ)}("undefined"!=typeof window?window:this,function(こころ,いつも){function ぴょ(こころ){var いつも=こころ.length,ぴょ=ぴょんとぴょんぴょんと.type(こころ);return"function"===ぴょ||ぴょんとぴょんぴょんと.isWindow(こころ)?!1:1===こころ.nodeType&&いつも?!0:"array"===ぴょ||0===いつも||"number"==typeof いつも&&いつも>0&&いつも-1 in こころ}function ぴょん(こころ,いつも,ぴょ){if(ぴょんとぴょんぴょんと.isFunction(いつも))return ぴょんとぴょんぴょんと.grep(こころ,function(こころ,ぴょん){return!!いつも.call(こころ,ぴょん,こころ)!==ぴょ});if(いつも.nodeType)return ぴょんとぴょんぴょんと.grep(こころ,function(こころ){return こころ===いつも!==ぴょ});if("string"==typeof いつも){if(こころぴょーんぴょんと.test(いつも))return ぴょんとぴょんぴょんと.filter(いつも,こころ,ぴょ);いつも=ぴょんとぴょんぴょんと.filter(いつも,こころ)}return ぴょんとぴょんぴょんと.grep(こころ,function(こころ){return ぴょんとぴょんぴょんと.inArray(こころ,いつも)>=0!==ぴょ})}function ぴょんと(こころ,いつも){do こころ=こころ[いつも];while(こころ&&1!==こころ.nodeType);return こころ}function ぴょーん(こころ){var
View youtyping.min.js
var YouTyping=function(){function ぴょん(ぴょん){var ぴょんぴょん=new Date,ぴょんぴょんぴょんぴょん=ぴょんぴょんぴょん(ぴょんぴょん.getHours(),2),ぴょんぴょんぴょんぴょんぴょん=ぴょんぴょんぴょん(ぴょんぴょん.getMinutes(),2),ぴょんぴょんぴょんぴょんぴょんぴょん=ぴょんぴょんぴょん(ぴょんぴょん.getSeconds(),2),ぴょんぴょんぴょんぴょんぴょんぴょんぴょん=ぴょんぴょんぴょん(ぴょんぴょん.getMilliseconds(),3);$("#debug").append("["+ぴょんぴょんぴょんぴょん+":"+ぴょんぴょんぴょんぴょんぴょん+":"+ぴょんぴょんぴょんぴょんぴょんぴょん+"."+ぴょんぴょんぴょんぴょんぴょんぴょんぴょん+"] "+ぴょん+"\n"),console.log(ぴょん)}function ぴょんぴょん(ぴょん){ぴょん=ぴょん.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var ぴょんぴょん=new RegExp("[\\?&]"+ぴょん+"=([^&#]*)"),ぴょんぴょんぴょん=ぴょんぴょん.exec(location.search);return null===ぴょんぴょんぴょん?"":decodeURIComponent(ぴょんぴょんぴょん[1].replace(/\+/g," "))}function ぴょんぴょんぴょん(ぴょん,ぴょんぴょん){return ぴょん=ぴょん.toString(),ぴょん.length<ぴょんぴょん?ぴょんぴょんぴょん("0"+ぴょん,ぴょんぴょん):ぴょん}var ぴょんぴょんぴょんぴょん=function(ぴょんぴょんぴょん,ぴょんぴょんぴょんぴょん){var ぴょんぴょんぴょんぴょんぴょんぴょん=this;this.noteState={WAITING:0,HITTING:1,CLEARED:2,HITTINGFAILED:3,FAILED:4};var ぴょんぴょんぴょんぴょんぴょんぴょんぴょんぴょん,ぴょんぴょんぴょんぴょんぴょんぴょんぴょんぴょんぴょん=function(){ぴょんぴょんぴょんぴょんぴょんぴょんぴょんぴょん=$.Deferred(),ぴょん("Setting Player
View youtyping.min.js
var YouTyping=function(){function こころ(こころ){var いつも=new Date,ぴょん=ぴょ(いつも.getHours(),2),ぴょんと=ぴょ(いつも.getMinutes(),2),ぴょーん=ぴょ(いつも.getSeconds(),2),こころぴょん=ぴょ(いつも.getMilliseconds(),3);$("#debug").append("["+ぴょん+":"+ぴょんと+":"+ぴょーん+"."+こころぴょん+"] "+こころ+"\n"),console.log(こころ)}function いつも(こころ){こころ=こころ.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var いつも=new RegExp("[\\?&]"+こころ+"=([^&#]*)"),ぴょ=いつも.exec(location.search);return null===ぴょ?"":decodeURIComponent(ぴょ[1].replace(/\+/g," "))}function ぴょ(こころ,いつも){return こころ=こころ.toString(),こころ.length<いつも?ぴょ("0"+こころ,いつも):こころ}var ぴょん=function(ぴょ,ぴょん){var ぴょーん=this;this.noteState={WAITING:0,HITTING:1,CLEARED:2,HITTINGFAILED:3,FAILED:4};var いつもぴょん,ぴょぴょん=function(){いつもぴょん=$.Deferred(),こころ("Setting Player Up...");var いつも=document.createElement("script");いつも.src="https://www.youtube.com/iframe_api";var ぴょ=document.getElementsByTagName("script")[0];return ぴょ.parentNode.insertBefore(いつも,ぴょ),いつもぴょん.promise()};window.onYouTubeIframeAPIReady=function(){var ぴょ=ぴょーん.settings;こころ("Player API is Read
You can’t perform that action at this time.