Skip to content

Instantly share code, notes, and snippets.

Takeshi Takahashi therealtakeshi

Block or report user

Report or block therealtakeshi

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 node-folder-structure-options.md

What is your folder-structure preference for a large-scale Node.js project?

0: Starting from Rails

This is the reference point. All the other options are based off this.

|-- app
|   |-- controllers
|   |   |-- admin
View hot-swap
#!/bin/bash
# This script assumes you have an app running on 2 ports 4040 and 4041
# and that you can restart your app with a single command
APP_RESTART_COMMAND="/your/app/control restart"
# Find out if the app is running
function app_up {
port=$1
@therealtakeshi
therealtakeshi / help.js
Last active Aug 29, 2015
JS Helper Functions
View help.js
function styleByClass (className, styleObj) {
var data = styleObj;
var length = document.getElementsByClassName(className).length;
for (var key in data) {
for (var n = 0; n < length; n++) {
document.getElementsByClassName(className)[n].style[key] = data[key];
}
}
}
@therealtakeshi
therealtakeshi / CryptoJS-DES.html
Created Mar 1, 2016 — forked from ufologist/CryptoJS-DES.html
Use CryptoJS encrypt message by DES and direct decrypt ciphertext, compatible with Java Cipher.getInstance("DES")
View CryptoJS-DES.html
<!-- test pass with CryptoJS v3.1.2 -->
<script src="rollups/tripledes.js"></script>
<script src="components/mode-ecb.js"></script>
<script>
/**
* Encrypt message by DES in ECB mode and Pkcs7 padding scheme
*
* NOTE: DES is weak, please use 3DES(Triple DES) or AES
*
* @param {String} message
@therealtakeshi
therealtakeshi / materialDesignShadowHelper.less
Created Mar 3, 2016 — forked from gefangenimnetz/materialDesignShadowHelper.less
Less css box-shadow helper for cards & modals according to Googles Material Design spec.
View materialDesignShadowHelper.less
/**
* A mixin which helps you to add depth to elements according to the Google Material Design spec:
* http://www.google.com/design/spec/layout/layout-principles.html#layout-principles-dimensionality
*
* Please note that the values given in the specification cannot be used as is. To create the same visual experience
* the blur parameter has to be doubled.
*
* Author: Florian Kutschera (@gefangenimnetz), Conceptboard GmbH (@conceptboardapp)
*
* Example usage:
@therealtakeshi
therealtakeshi / Mixlr Toolkit
Last active Jan 10, 2017
Dark Theme for Mixlr
View Mixlr Toolkit
// by @therealtakeshi
// Setting up the options for localStorage;
var toStore = {
emo:false,
heart:false,
sounds:false,
msgLimit:false,
msgAllowed:200,
colorComment:"#E0A666",
colorUsername:"#D18026",
View keybase.md

Keybase proof

I hereby claim:

  • I am therealtakeshi on github.
  • I am therealtakeshi (https://keybase.io/therealtakeshi) on keybase.
  • I have a public key ASAtO-IjCR733G8F9bJaDTnphWviGB61SW5VAHG8nNPxNQo

To claim this, I am signing this object:

@therealtakeshi
therealtakeshi / blob.obj
Created Nov 27, 2017
Converted to OBJ via Blender from the Minions Art post ( https://www.patreon.com/posts/quick-game-art-15466787 )
View blob.obj
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
o Blob
v -0.289994 -0.290982 0.292353
v 0.274360 -0.274360 0.275164
v -0.250772 0.250772 0.250772
v 0.274360 0.273780 0.275164
v -0.250772 0.250772 -0.250772
v 0.274360 0.273780 -0.272976
v -0.289994 -0.290982 -0.288622
View pyra.babylon
{"producer":{"name":"Blender","version":"2.79 (sub 0)","exporter_version":"5.5.0","file":"pyra.babylon"},
"autoClear":true,"clearColor":[0.0509,0.0509,0.0509],"ambientColor":[0,0,0],"gravity":[0,-9.81,0],
"materials":[{"name":"pyra.Floor","id":"pyra.Floor","ambient":[0,0,0],"diffuse":[0.8,0.8,0.8],"specular":[1,1,1],"emissive":[0,0,0],"specularPower":64,"alpha":1,"backFaceCulling":true,"checkReadyOnlyOnce":false,"maxSimultaneousLights":4,
"diffuseTexture":{"name":"pyra_Floor_DIFFUSE.jpg","level":1,"hasAlpha":0,"coordinatesMode":0,"uOffset":0,"vOffset":0,"uScale":1,"vScale":1,"uAng":0,"vAng":0,"wAng":0,"wrapU":0,"wrapV":0,"coordinatesIndex":0,"base64String":"data:image/PNG;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4QAMTmVvR2VvAAAAMv/bAEMAEAsMDgwKEA4NDhIREBMYKBoYFhYYMSMlHSg6Mz08OTM4N0BIXE5ARFdFNzhQbVFXX2JnaGc+TXF5cGR4XGVnY//bAEMBERISGBUYLxoaL2NCOEJjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY//AABEIBAAEAAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBE
View pyra.obj
# Blender v2.79 (sub 0) OBJ File: 'pyra.blend'
# www.blender.org
o Floor_Cube.013
v -0.972000 0.000000 0.972000
v -0.972000 0.000000 -0.972000
v 0.972000 0.000000 0.972000
v 0.972000 0.000000 -0.972000
v -0.957414 0.005475 0.957414
v -0.957414 0.005475 -0.957414
v 0.957414 0.005475 0.957414
You can’t perform that action at this time.