Skip to content

Instantly share code, notes, and snippets.

View therealtakeshi's full-sized avatar

Takeshi Takahashi therealtakeshi

View GitHub Profile
@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 / 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
#!/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

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