Skip to content

Instantly share code, notes, and snippets.

View zackexplosion's full-sized avatar
🏠
Working from home

Zack zackexplosion

🏠
Working from home
View GitHub Profile
const app = {
name: 'solar-watcher-client',
script: './index.js',
env: {
CLIENT_ID: 'J=_pxGn4m5W4(=v',
CLIENT_LOGGER_URL: 'http://solar-data.zackexplosion.fun',
CLIENT_SERIAL_PORT_PATH: '/dev/serial/by-id/usb-FTDI_FT231X_USB_UART_D309Q80Z-if00-port0',
},
}
@zackexplosion
zackexplosion / deploy.sh
Created November 16, 2021 01:54
docker build and deploy to nas
IMAGE_NAME=your-image-name
NAS_URI=yourname@yournas.com
ARCHIVE_FILE_NAME=archive.tar
REMOTE_PATH=/a/remote/path
REMOTE_PORT=22
PORTMAP=1111:1111
rm $ARCHIVE_FILE_NAME
docker rmi $IMAGE_NAME
docker build . -t $IMAGE_NAME
@zackexplosion
zackexplosion / yolo.js
Last active October 14, 2021 11:22
藍新後台出貨單下載
// make sure you have been login to https://www.newebpay.com/sale/Sell_center/search_transaction
// copy and paste this snippit to web dev console
// exportToCsv credit
// https://stackoverflow.com/questions/14964035/how-to-export-javascript-array-info-to-csv-on-client-side
function exportToCsv(filename, rows) {
var processRow = function (row) {
var finalVal = '';
for (var j = 0; j < row.length; j++) {
var innerValue = row[j] === null ? '' : row[j].toString();
@zackexplosion
zackexplosion / .markdown
Created August 1, 2020 19:02
抽獎機率設定
const moment = require('moment')
const ecpay_payment = require('ecpay-payment')
function getAddress (invoice) {
if (invoice.string_address) {
return invoice.string_address
}
var address = ''
try {
2015-01-03 05:41:08 中和-土城
2015-01-03 05:43:56 土城-樹林
2015-01-03 05:47:56 三鶯-鶯歌系統
2015-01-03 05:49:38 鶯歌系統-大溪
2015-01-03 05:53:53 大溪-龍潭
2015-01-03 05:56:28 龍潭-關西服務區
2015-01-03 06:00:47 關西服務區-關西
2015-01-03 06:03:56 關西-竹林
2015-01-03 06:09:47 竹林-寶山
2015-01-03 06:11:34 寶山-新竹系統
@zackexplosion
zackexplosion / 萬董.md
Last active September 27, 2019 11:57
撞遊覽車神人 萬子彈 萬家豪 萬應公200條事蹟 重新連載 不定期更新條文

出處:https://home.gamer.com.tw/creationDetail.php?sn=2927540

原始版本每一條的格式不太整齊,因此整理一下貼到這來ww


  1. 買個鎮暴槍去人家生存版說要打生存 鬧到眾人皆恥笑
  2. 去EYNY取暖結果搞到帳號被禁止訪問
  3. 到女巴友小屋言語騷擾 問人家是不是處女
  4. 拿著一台最基本的代步工具當寶四處炫 還不是自己賺來的 是親戚家出的錢
  5. 月薪不到22K生活堪慮卻硬要打腫臉充胖子 硬要學人買iPhone
/*
This test code is write for Arduino AVR Series(UNO, Leonardo, Mega)
If you want to use with LinkIt ONE, please connect the module to D0/1 and modify:
// #include <SoftwareSerial.h>
// SoftwareSerial s_serial(2, 3); // TX, RX
#define sensor Serial1
*/
@zackexplosion
zackexplosion / yeee.erb
Created January 29, 2019 08:42
安安,這可能是一封信喔
<p><%= @supplier.name %>您好:</p>
下列連結是小院<%= @month %>月份的平台服務費金額,煩請依連結付款:
<p>付費流程如下:</p>
<a href="<%= @payment_link %>" target="_blank"><%= @payment_link %></a>
<ol>
<li>點選連結,確認資料無誤,送出資料,系統會產生一組轉帳帳號。</li>