Skip to content

Instantly share code, notes, and snippets.

@ayhaadam
ayhaadam / Git.sublime-settings
Created August 13, 2013 03:35
Git plug-in for Sublime Text 2 Setting
{
"git_command": "/usr/local/git/bin/git"
}
@ayhaadam
ayhaadam / Get 400*640 Dappei Photo
Last active December 23, 2015 01:09
Dappei bookmarklet
javascript:var photo_url = $(".photo img").prop('src'); window.open(photo_url);
@ayhaadam
ayhaadam / gist:65cc4f29ca4b5ec43fa4
Created January 20, 2015 02:47
Apple's Font Smoothing
body, input, textarea, select, button {
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-moz-font-feature-settings: "liga", "kern";
}
@ayhaadam
ayhaadam / test.c
Created September 21, 2015 06:21
test
#include <cv.h>
#include <highgui.h>
#include <stdio.h>
#include <stdlib.h>
int HistogramBins = 256;
float HistogramRange1[2]={0,255};
float *HistogramRange[1]={&HistogramRange1[0]};
int main()
@ayhaadam
ayhaadam / mixin.scss
Created November 18, 2015 02:49
Sass Bootstrap Media Queries Mixin
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
/* Extra Small Devices, Phones */
@media only screen and (min-width : 480px) {
@ayhaadam
ayhaadam / style.css
Created January 21, 2016 05:03
Ease
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
@ayhaadam
ayhaadam / command.sh
Last active February 15, 2017 04:08
Server Command Note
// 重開機
sudo reboot
// 設定檔測試
sudo nginx -t
// 重啟 nginx
sudo systemctl reload nginx
// 重啟 PHP FPM
/wp-json/wc/v1/orders?filter[meta_query][0][key]=_shipping_date&filter[meta_query][0][value][0]=2017/01/01&filter[meta_query][0][value][1]=2017/01/31&filter[meta_query][0][compare]=BETWEEN
@ayhaadam
ayhaadam / index.html
Created October 15, 2017 13:08
Vue.js + PhotoSwipe.js
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Test</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/photoswipe.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/default-skin/default-skin.min.css">
<link rel="stylesheet" href="./css/style.css">
</head>
var csvArray = [];
this.exportOrders.forEach(function(order, index) {
var csvEntry = [order.id, order.card.from , order.card.to, order.card.content];
csvArray.push(csvEntry);
});
// http://papaparse.com
var csvString = Papa.unparse({
fields: ['訂單編號', '卡片 From', '卡片 To', '內容'],