Skip to content

Instantly share code, notes, and snippets.

View RadianSmile's full-sized avatar

Radian RadianSmile

  • Provision Co., Ltd
  • Taipei, Taiwan
  • 05:19 (UTC +08:00)
View GitHub Profile
//music
import ddf.minim.spi.*;
import ddf.minim.signals.*;
import ddf.minim.*;
import ddf.minim.analysis.*;
import ddf.minim.ugens.*;
import ddf.minim.effects.*;
Minim minim;
AudioPlayer popo;
AudioPlayer bling;
<head>
<script type="text/javascript">
window.fbAsyncInit = function() {
Parse.initialize("xxx", "xxx");
Parse.FacebookUtils.init({
appId : 'xxx',
cookie : true,
xfbml : true,
version : 'v1.0' // !! I change this because some said to do this. I forget the reference
<!DOCTYPE html>
<html>
<head>
<link rel="prefetch" href="http://140.119.134.100/co-construction/infoA.php?bid=1" />
<link rel="prerender" href="http://140.119.134.100/co-construction/infoA.php?bid=1" />
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
@RadianSmile
RadianSmile / 周老師的搜尋頁面
Created April 18, 2015 13:41
Element V2: Custom Search Engine Results-only Layout Demo// source http://jsbin.com/noyura
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<title>Element V2: Custom Search Engine Results-only Layout Demo</title>
<style type="text/css">
h4.warning {color: red;}
h4.recommendation {color: green;}
</style>
// npm i request cheerio json2csv
var fs = require('fs'),
request = require('request'),
cheerio = require('cheerio'),
json2csv = require('json2csv');
var HOST = 'https://www.ptt.cc';
var getMenu = function (url, callback, links) {
var links = links || []; // Set default value for links (initial call)
@RadianSmile
RadianSmile / ctags definitions for Javascript
Created September 28, 2015 05:26 — forked from tim-smart/ctags definitions for Javascript
CTags Definitions for Javascript
--langdef=js
--langmap=js:.js
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*\{/\5/,object/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*function[ \t]*\(/\5/,function/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*\[/\5/,array/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*[^"]'[^']*/\5/,string/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*(true|false)/\5/,boolean/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*[0-9]+/\5/,number/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*.+([,;=]|$)/\5/,variable/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*[ \t]*([,;]|$)/\5/,variable/
alert("a.js");
@RadianSmile
RadianSmile / Hanoi.java
Last active November 2, 2015 17:19
Hanoi for Alice
import java.util.*;
/* Class TowerOfHanoiUsingStacks */
public class HanoiStacks {
public static int N;
public static Stack<Integer>[] tower = new Stack[4];
// 為什麼是 4 ? 因為為了要用到 1 , 2 , 3 這個數字,不用 0
public static void main(String[] args) {
@RadianSmile
RadianSmile / HTML 5 Microphone Visualizer.markdown
Created January 6, 2016 15:59
HTML 5 Microphone Visualizer
@RadianSmile
RadianSmile / gist:8d791803d488d817ddcf
Created February 13, 2016 01:42 — forked from mhawksey/gist:1276293
Google App Script to insert data to a google spreadsheet via POST or GET - updated version as per https://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software