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
/** | |
* | |
* 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" |
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
# -*- coding: utf-8 -*- | |
# | |
# Copyright 2020 isobar. All Rights Reserved. | |
# | |
# Usage: | |
# python qrdecoder.py img.jpg | |
# | |
import os | |
import sys | |
import json |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder