Skip to content

Instantly share code, notes, and snippets.

View elct9620's full-sized avatar
💦
Level up!!!

蒼時弦や elct9620

💦
Level up!!!
View GitHub Profile
using UnityEngine;
using UnityEditor;
using System;
using System.Collections;
using System.Collections.Generic;
using UniRx;
public class DatabaseDownloader {
public static string DatabaseURL = "SERVER_URL";
private const string Token = "TOKEN";
/*
doc.Items.map(function(id) {
return Check.
findById(id.toString())
.then(function(doc){
doc = doc.toObject();
return doc;
})
})
*/
Cat.summon do
skin do
var :catBody, 'rgb(230, 165, 100)'
var :catBelly, 'rgb(240, 190, 120)'
var :catTail, 'rgb(190, 130, 80)'
var :strokeColor, 'rgb(50, 50, 70)'
end
skeleton do
@elct9620
elct9620 / pre-commit
Last active April 20, 2017 07:12
.git/hooks/pre-commit
#!/bin/sh
#
# Check for ruby style errors
red='\033[0;31m'
green='\033[0;32m'
yellow='\033[0;33m'
NC='\033[0m'
if git rev-parse --verify HEAD >/dev/null 2>&1
pushMatrix(); // 儲存修改
rotate(PI / 4); // rad = PI / 4 = 45deg (把角度換算成弧度)
ellipse(width / 2, height / 2, 100, 50); // 繪製一個橢圓(在畫面中央)
popMatrix(); // 套用修改
function RawToBook(raw) {
var columns = raw.split(',');
return {
IBSN: columns[0],
Title: columns[1],
Author: columns[2],
Press: columns[3],
Class: columns[4],
Description: columns[5],
};
soruce = File.readlines('source.txt').map(&:chomp)
target = File.readlines('target.txt').map(&:chomp)
source - target
class MyError < StandardError
attr_reader :code
def initialize(code)
@code = code
end
end
def go
raise MyError.new(404), 'Not Found'
rescue StandardError => e
# Start Command: rackup
require 'socket'
# Initialize Socket -> Pure Data
pd = TCPSocket.new 'localhost', 3000
# Create HTTP Server
app = Proc.new do |env|
# /?Do=1&Re=0
query = env['QUERY_STRING']
require 'socket'
require 'fiber'
class Selector
def initialize
@readable = {}
@writeable = {}
end
def wait_readable(io)