Skip to content

Instantly share code, notes, and snippets.

@auycro
auycro / AboutSSL.md
Last active June 23, 2016 03:10
play with ssl

#Create SSL key and CSR (Certificate Sign Request) by req

 $ openssl req -new -newkey rsa:2048 -nodes -keyout foo_server.key -out bar_server.csr

#Create SSL key and CSR by genrsa

 $ openssl genrsa -aes128 -out foo_server.key 2048
 $ openssl genrsa -des3 -out foo_server.key 2048
 #if you don't need passphrase, leave encrypt blank
@auycro
auycro / lesson1.md
Last active June 20, 2016 22:03
udacity Full Stack foundation

#install python #install sqlalchemy

#database_setup.py

import sys
from sqlalchemy import Integer,Column.ForeignKey,String
from sqlclchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy import create_engine
@auycro
auycro / test-vg.log
Last active July 4, 2016 09:34
something about vagrant and docker
Set Up Vagrant
-initialize vagrant
$ vagrant init
-you can find a box in https://atlas.hashicorp.com/boxes/search
$ vagrant box add {box_name}
-config vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/precise64"
end
-test vagrant
@auycro
auycro / UpperHelper.cs
Created June 14, 2016 10:42
Upper for checking file
using UnityEngine;
using UnityEditor;
using System.Collections;
[InitializeOnLoad]
public class UpperHelper {
static UpperHelper() {
Debug.Log ("UpperHelper");
Test ();
}
Potter= simple online battle game
Team-User
=Minion[10]
=Coach[1..3]
=Scout[1..3]
=Game[]
=League
=Star
=Coin
/****************************************************************************
* This demonstrates binary heap operations along with the heapSort.
*
*****************************************************************************/
import java.util.*;
@SuppressWarnings("unchecked")
public class Heap<AnyType extends Comparable<AnyType>>
{
private static final int CAPACITY = 2;
@auycro
auycro / MoveCamera.cs
Created May 27, 2016 01:12 — forked from JISyed/MoveCamera.cs
Camera movement script in Unity3D. Supports rotating, panning, and zooming. Attach to the main camera. Tutorial explaining code: http://jibransyed.wordpress.com/2013/02/22/rotating-panning-and-zooming-a-camera-in-unity/
// Credit to damien_oconnell from http://forum.unity3d.com/threads/39513-Click-drag-camera-movement
// for using the mouse displacement for calculating the amount of camera movement and panning code.
using UnityEngine;
using System.Collections;
public class MoveCamera : MonoBehaviour
{
//
// VARIABLES
@auycro
auycro / FileSaver.min.js
Created May 9, 2016 10:06 — forked from noonworks/FileSaver.min.js
腐葉土っぽい表紙画像ジェネレータ
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
var saveAs=saveAs||function(e){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var t=e.document,n=function(){return e.URL||e.webkitURL||e},o=t.createElementNS("http://www.w3.org/1999/xhtml","a"),r="download"in o,i=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},a=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),c=e.webkitRequestFileSystem,f=e.requestFileSystem||c||e.mozRequestFileSystem,u=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},d="application/octet-stream",s=0,l=4e4,v=function(e){var t=function(){"string"==typeof e?n().revokeObjectURL(e):e.remove()};setTimeout(t,l)},p=function(e,t,n){t=[].concat(t);for(var o=t.length;o--;){var r=e["on"+t[o]];if("function"==typeof r)try{r.call(e,n||e)}catch(i){u(i)}}},w=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.typ
@auycro
auycro / chatwork-google-app-script.
Last active April 12, 2016 03:55
chatwork google app script
function myFunction() {
var key = "{token-key}";
var url = "https://api.chatwork.com/v1/my/status";
//var url = "https://api.chatwork.com/v1/rooms/{room-id}/messages";
sendToService_(url,key);
}
function sendToService_(url,key) {
@auycro
auycro / UnitySlidePanelManager.cs
Last active March 9, 2016 09:55
UnitySlidePanelManager
//Copyright (c) 2016 Gumpanat Keardkeawfa
//Licensed under the MIT license
/*** GameObjectStructure ***
GameObjectWithMask
-RectMask2D
++Grid
-HorizontalLayoutGrid
-ContentSizeFitter
++Content1