Skip to content

Instantly share code, notes, and snippets.

@wwwins
wwwins / css3d.html
Created December 16, 2019 03:02
CSS 3D Carousel
<!DOCTYPE html>
<html>
<html>
<head>
<style>
/*
嘗試用 css 3d 做出旋轉木馬的效果
目標:儘可能使用 css
*/
@wwwins
wwwins / .dockerignore
Last active December 9, 2019 06:06
Simple dockerignore file for nodejs
#
# Simple dockerignore file for nodejs
#
# |-- .dockerignore
# |-- Makefile
# |-- app
# |-- creds
# |-- modules
# |-- node_modules
# |-- public
@wwwins
wwwins / mk-node-package-conf.sh
Last active May 17, 2019 07:36
Init node package.conf
#!/bin/sh
#
# Copyright 2018 isobar. All Rights Reserved.
#
# Usage:
# ./mk-node-package-conf.sh web-server wwwins
#
echo '>>>>> nodejs package.json init <<<<<'
if [ -z "$1" ]
@wwwins
wwwins / image-cnt.py
Last active April 22, 2019 08:22
Count files in folder
#!/usr/bin/env python2
#
# Copyright 2019 isobar. All Rights Reserved.
#
# Count files in folder
#
# Usage:
# image-cnt.py public/upload
#
import os
@wwwins
wwwins / process-pool.sh
Created March 8, 2019 08:51
A simple process pool in shell script
#!/bin/sh
FILENAME="XXX.py"
if [ -z $CORES ]
then
CORES=3
fi
cnt=0
@wwwins
wwwins / random-sleep.sh
Created March 8, 2019 08:47
Random sleep 0.x sec in shell script
#!/bin/sh
sleep $(awk 'BEGIN { "date +%N" | getline seed; srand(seed); print rand(); }')
@wwwins
wwwins / mv2folder.py
Created February 17, 2019 16:08
Move files to folder by date
#!/usr/bin/python
#
# Copyright 2019 isobar. All Rights Reserved.
#
# Move files to folder by date
#
# Usage:
# mv2folder.py .
#
@wwwins
wwwins / ngrok.md
Last active February 13, 2019 06:53
ngrok
ngrok http 8888
ssh -R yoursubdomain:80:localhost:8888 serveo.net
Hi there
Forwarding HTTP traffic from https://yoursubdomain.serveo.net
Press g to start a GUI session and ctrl-c to quit.
...
@wwwins
wwwins / LunarSolarConverter.js
Last active January 4, 2019 09:23
lunar converter
/**
* Modified by isobar on 04/01/19.
*
* Created by isee15 on 15/1/14.
*/
/*
Usage:
var converter = new LunarSolarConverter();
var solar = new Solar();
solar.solarYear = 1985;
@wwwins
wwwins / mk-py-pkg.sh
Last active December 20, 2018 03:53
Init python package
#!/bin/sh
#
# Copyright 2018 isobar. All Rights Reserved.
#
# Usage:
# ./mk-py-pkg.sh MyImgPy wwwins xxx@aaa.bbb.ccc
#
echo '>>>>> python package init <<<<<'
if [ -z "$1" ]