Skip to content

Instantly share code, notes, and snippets.

View scuxiayiqian's full-sized avatar

Yiqian Hsia scuxiayiqian

View GitHub Profile
@scuxiayiqian
scuxiayiqian / gnuplot_aquaterm_install.md
Last active June 3, 2021 18:40
Install gnuplot and aquaterm on OSX 10.11

First you should have homebrew installed on your mac. How to install homebrew

Before installing gnuplot, you should install Aqua first. Go here to download the AquaTerm-1.1.1.dmg then install it.

If you have ever installed gnuplot before, please uninstall it first.

$ brew uninstall gnuplot
$ brew update && brew upgrade
@scuxiayiqian
scuxiayiqian / export-html-table-to-excel.md
Created March 19, 2016 08:27 — forked from umidjons/export-html-table-to-excel.md
Export HTML table to Excel in AngularJS

Export HTML table to Excel in AngularJS

myApp.factory('Excel',function($window){
		var uri='data:application/vnd.ms-excel;base64,',
			template='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>',
			base64=function(s){return $window.btoa(unescape(encodeURIComponent(s)));},
			format=function(s,c){return s.replace(/{(\w+)}/g,function(m,p){return c[p];})};
		return {
@scuxiayiqian
scuxiayiqian / interval.js
Created March 18, 2016 06:29
离开页面时取消定时器
var promise;
// starts the interval
$scope.start = function() {
// stops any running interval to avoid two intervals running at the same time
$scope.stop();
// store the interval promise
promise = $interval(getOrderList, 5000);
console.log("start");
@scuxiayiqian
scuxiayiqian / ubuntu.md
Last active November 2, 2015 12:23
How to deploy k8s on ubuntu cluster