Skip to content

Instantly share code, notes, and snippets.

@fantasywind
fantasywind / equalizer.js
Last active August 25, 2016 21:19
Javascript Audio Frequency Based Equalizer
// Sample of setting
// const setting = {
// left: [
// [50, 0],
// [1000, 0],
// [2000, 0],
// [4000, 0],
// [8000, 0],
// [12000, 0],
// [15000, 0],
@fantasywind
fantasywind / Blur.js
Last active August 22, 2016 17:58
<Blur /> React Component Wrapper [iOS_Frosted_Glass_Effect]
import React, {
PropTypes as T,
Component,
} from 'react';
import radium from 'radium';
import backgroundImage from '../static/images/background.jpg';
const ANIMATION_DURATION = 1000;
const opacityAnimation = radium.keyframes({
@fantasywind
fantasywind / ios_frame.html
Last active August 9, 2016 17:21
AAMS iOS YouTube Frame
<!DOCTYPE html>
<html>
<body>
<div id="player"></div>
<script>
var apiLoaded = false;
var playerReady = false;
var player;
function onYouTubeIframeAPIReady() {
@fantasywind
fantasywind / .eslintrc
Last active June 30, 2016 08:48
Rytass ES6 ESLint
{
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
}
},
"plugins": [
"react",
{
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
}
},
"plugins": [
"react",
{
"paymentMethod": "Credit",
"orderItems": [{
"ProductId": 1,
"quantity": 1,
"name": "好棒棒",
"description": "好棒棒是誰",
"price": 255
}, {
"ProductId": 3,
@fantasywind
fantasywind / .eslintrc
Last active November 2, 2015 17:54
Rytass ECMAScript Lint
{
"plugins": [
"react"
],
"ecmaFeatures": {
"jsx": true,
"modules": true
},
"env": {
@fantasywind
fantasywind / tw-zipcode.json
Last active January 5, 2024 03:27
[台灣][郵遞區號][中華民國][Taiwan][Zipcode][3碼] JSON
{
"基隆市": {
"仁愛區": "200",
"信義區": "201",
"中正區": "202",
"中山區": "203",
"安樂區": "204",
"暖暖區": "205",
"七堵區": "206"
},
@fantasywind
fantasywind / gist:959209cce7848518aec5
Last active September 18, 2015 11:05
Sizmek Apple Daily Test Formats
<!-- Suooprt Browsers IE 11, Edge, Chrome, Firefox, Safari, Opera -->
<!--
| Format Full Page Opening |
使用說明:
請將 Message Sync, Full Page Opening 放置於廣告版位任意位置,
但順序不得改變,避免複雜的排版造成螢幕大小抓取錯誤的可能。
Door Panel 請直接放置在顯示位置容器中
-->
<!-- Message Sync -->
/// var encryptedstring = Crypt.Encrypt("我要加密", "This is password", "Taisugar2015", "SHA1", 3, "1qazxsw23edcvfr4", 256);
/// var decryptedstring = Crypt.Decrypt(encryptedstring, "This is password", "Taisugar2015", "SHA1", 3, "1qazxsw23edcvfr4", 256);
/// </summary>
/// <param name="passtext"></param>
/// <param name="passPhrase"></param>
/// <param name="saltValue"></param>
/// <param name="hashAlgorithm"></param>
/// <param name="passwordIterations"></param>
/// <param name="initVector"></param>
/// <param name="keySize"></param>