Skip to content

Instantly share code, notes, and snippets.

View synr's full-sized avatar

synr

View GitHub Profile
@synr
synr / [JavaScript Bookmarklet Tool]get_markdown_link_to_save_trello_card.min.js
Last active October 20, 2016 07:58
[取得 Markdown 格式的連結並傳到 Trello (壓縮板、指定傳Trello)]get markdown link format to save web to trello.com
@synr
synr / [JavaScript Bookmarklet Tool]get_markdown_link_to_save_trello_card.full.js
Last active October 20, 2016 08:20
[取得 Markdown 格式的連結並傳到 Trello (完整版,有留變數當開關)]get markdown format link to save trello new card (full var.)
@synr
synr / is_mobile.js(JavaScript)
Last active October 20, 2016 07:41
判斷是不是行動裝置瀏覽者的寫法
//重點是下面這行
// true = 是手機,false 就是其他可能(電腦等等的)
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
//-------------------------------------------------------------------------------------------------------
// 用法:直接單獨寫在 if 等等裡面的條件使用即可
/*
@synr
synr / [JavaScript Bookmarklet Tool]get_markdown_link.mini.js
Last active October 20, 2016 07:59
[取得 Markdown 格式的連結](壓縮板,已修正 youtube 問題)
@synr
synr / share this page with markdown link format to plurk
Last active October 20, 2016 08:49
用 Markdown 連結格式分享目前的網頁到噗浪(Plurk)[自動切換電腦版/行動版網頁的寫法](HTML a tag + JavaScript)
@synr
synr / get_bootswatch_theme_name.js
Last active October 21, 2016 16:41
2016.10.21 判別目前的 bootstrap 佈景主題
//2016.10.21 判別 theme-color https://blog.gtwang.org/web-development/android-chrome-browser-theme-color-support/
function get_theme_color(){
var get_color = '';
var x = document.getElementsByTagName('meta');
var i = x.length;
while (i--) {
if (x[i].name == 'theme\-color') {
get_color = x[i].content;
return get_color;
}
@synr
synr / 彩虹背景XD.css
Created November 14, 2016 23:26 — forked from anonymous/my.css
CSS Gradient Animation
/* https://www.gradient-animator.com/ */
background: linear-gradient(136deg, #b43c0f, #903e07, #725808, #5d5f0d, #729618, #7aa11b, #276b18, #19692d, #0e9862, #0c7d52, #0c687d, #0c227d, #0f0c7d, #360c7d, #4a0c7d, #5e0c7d, #720c7d, #7d0c65, #7d0c47, #7d0c24);
background-size: 4000% 4000%;
-webkit-animation: AnimationName 16s ease infinite;
-moz-animation: AnimationName 16s ease infinite;
-o-animation: AnimationName 16s ease infinite;
animation: AnimationName 16s ease infinite;
@-webkit-keyframes AnimationName {
    0%{background-position:0% 45%}
@synr
synr / 彩虹.css
Last active November 14, 2016 23:55 — forked from anonymous/my.css
CSS Gradient Animation
/* https://www.gradient-animator.com */
background: linear-gradient(180deg, #ea0b0b, #ea520b, #d7c005, #52a82a, #289d27, #2ab793, #28949f, #2a97b7, #2a97b7, #2a46b7, #402ab7, #5f2ab7, #782ab7, #912ab7, #b02ab7, #b72a93, #b72a6d, #b72a48, #b72a2a);
background-size: 3800% 3800%;
-webkit-animation: AnimationName 60s ease 2s infinite;
-moz-animation: AnimationName 60s ease 2s infinite;
-o-animation: AnimationName 60s ease 2s infinite;
animation: AnimationName 60s ease 2s infinite;
@-webkit-keyframes AnimationName {
    0%{background-position:0% 97%}
@synr
synr / my.css
Created November 14, 2016 23:56 — forked from anonymous/my.css
CSS Gradient Animation
background: linear-gradient(180deg, #ea0b0b, #ea520b, #d7c005, #52a82a, #289d27, #2ab793, #28949f, #2a97b7, #2a97b7, #2a46b7, #402ab7, #5f2ab7, #782ab7, #912ab7, #b02ab7, #b72a93, #b72a6d, #b72a48, #b72a2a);
background-size: 3800% 3800%;
-webkit-animation: AnimationName 53s ease infinite;
-moz-animation: AnimationName 53s ease infinite;
-o-animation: AnimationName 53s ease infinite;
animation: AnimationName 53s ease infinite;
@-webkit-keyframes AnimationName {
    0%{background-position:0% 78%}
    50%{background-position:100% 23%}
    100%{background-position:0% 78%}
@synr
synr / 寶寶.js
Created November 18, 2016 17:43 — forked from DingWeizhe/寶寶.js
新增line的功能
var fs = require('fs'),
http = require('http'),
https = require('https'),
express = require('express'),
bodyParser = require('body-parser'),
request = require('request'),
crypto = require('crypto'),
FBToken = '',
port = 443,
options = {