isobartw-push:
$(DK) push isobartw/node:$(NODE_TAG)-alpine
$(DK) push isobartw/node:$(NODE_TAG)
$(DK) push isobartw/node:lts
$(DK) push isobartw/node:$(NODE_TAG)-alpine-pm2
$(DK) push isobartw/node:$(NODE_TAG)-pm2
$(DK) push isobartw/node:$(NODE_TAG)-alpine-gm
$(DK) push isobartw/node:$(NODE_TAG)-gm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remap C-b to C-a | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
# split panes using \ and - in current path | |
bind '\' split-window -hc "#{pane_current_path}" | |
bind - split-window -vc "#{pane_current_path}" | |
bind c new-window -c "#{pane_current_path}" | |
unbind % |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[general] | |
#import = ["~/.config/alacritty/tomorrow_night_bright.toml"] | |
[window] | |
startup_mode = "Maximized" | |
decorations = "Buttonless" | |
[scrolling] | |
history = 10000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* Uploading binary data with nodejs | |
* axios + fs.createReadStream | |
* | |
* */ | |
const fs = require('fs'); | |
const axios = require('axios').default; | |
const FormData = require('form-data'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -r 0.01 -loop 1 -i image.jpg -c:v libx264 -tune stillimage -preset ultrafast -ss 00:00:00 -t 00:00:10 -pix_fmt yuv420p -shortest out.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# convert unix timestamp to the local timezone | |
tail -f logs/access.log | jq '.time |= (tonumber / 1000 | strflocaltime("%c %Z"))' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// without hidden folders | |
for f in $(ls -d */); | |
do | |
echo "zip -r -X ${f:0:-1}.zip $f" | |
done | |
// include hidden folders | |
for f in $(ls -Al | awk -F" " '/^d/ {print $9}'; | |
do | |
echo "zip -r -X $f.zip $f" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace "4bk.aaa.com.tw" -> "bk.aaa.com.tw" in *.js|htm|html|css files | |
find www -type f \( -iname "*.js" -or -iname "*.htm" -or -iname "*.html" -or -iname "*.css" \) -exec sed -i '' 's/4bk.aaa.com.tw/bk.aaa.com.tw/g' {} + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
START_TIME=$SECONDS | |
set -e | |
echo "-----START GENERATING HLS STREAM-----" | |
# Usage create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME] | |
[[ ! "${1}" ]] && echo "Usage: create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]" && exit 1 | |
# comment/add lines here to control which renditions would be created | |
renditions=( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
usage() | |
{ | |
echo "" | |
echo "Usage: $0 -n project-name -o project-owner -p port -t [init|update]" | |
echo "\t-n project name" | |
echo "\t-o project owner" | |
echo "\t-p port" | |
echo "\t-t init or update" |
NewerOlder