Skip to content

Instantly share code, notes, and snippets.

View therealtakeshi's full-sized avatar

Takeshi Takahashi therealtakeshi

View GitHub Profile

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
@therealtakeshi
therealtakeshi / Mixlr Toolkit
Last active February 15, 2021 01:07
Dark Theme for Mixlr
// by @therealtakeshi
// Setting up the options for localStorage;
var toStore = {
emo:false,
heart:false,
sounds:false,
msgLimit:false,
msgAllowed:200,
colorComment:"#E0A666",
colorUsername:"#D18026",
#!/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 August 29, 2015 14:02
JS Helper Functions
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 March 1, 2016 22:31 — forked from ufologist/CryptoJS-DES.html
Use CryptoJS encrypt message by DES and direct decrypt ciphertext, compatible with Java Cipher.getInstance("DES")
<!-- 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 March 3, 2016 18:44 — forked from gefangenimnetz/materialDesignShadowHelper.less
Less css box-shadow helper for cards & modals according to Googles Material Design spec.
/**
* 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 / keybase.md
Created May 12, 2017 16:23
Proof for Keybase

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 November 27, 2017 01:36
Converted to OBJ via Blender from the Minions Art post ( https://www.patreon.com/posts/quick-game-art-15466787 )
# 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
@therealtakeshi
therealtakeshi / pyra.obj
Last active January 15, 2018 05:36
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
@therealtakeshi
therealtakeshi / pyra.babylon
Last active January 15, 2018 00:51
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