Skip to content

Instantly share code, notes, and snippets.

View MikletNg's full-sized avatar

Mighty Mike MikletNg

View GitHub Profile
@MikletNg
MikletNg / index.pug
Created January 10, 2023 16:40
Minecraft Wolf - 3D CSS
// Lil minecraft wolf
// source:
// https://minecraft.fandom.com/wiki/Wolf
// Inspired by the works of Grant Jenkins:
// https://codepen.io/grantjenkins/pen/ZExEOex?editors=0100
mixin box(name)
.box(class=name)
#!/usr/bin/env bash
echo "Searching for image where name begins with $1"
regions=$(aws ec2 describe-regions --output text --query 'Regions[*].RegionName')
for region in $regions; do
(
echo "$region $( aws ec2 describe-images --region $region --filters Name=is-public,Values=true Name=name,Values="$1*" | grep ImageId )"
)
done
#
# Given the ID of an Amazon public AMI in one region, figure out what the
# equivalent AMI IDs are for that same AMI in all other regions known.
# If that AMI isn't defined in a region, it prints the region's name, but
# comments it out.
#
from __future__ import print_function
import boto3
Set-Location "C:\Windows\system32"
Set-ExecutionPolicy RemoteSigned -Force
$TempPath = $env:TEMP
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install -y git.install awscli make
aws --version
git --version
@MikletNg
MikletNg / config.json
Last active July 4, 2019 13:51
teddysun/shadowsocks-r Configuration File
{
"server":"0.0.0.0",
"server_ipv6":"::",
"server_port":8888,
"local_address":"127.0.0.1",
"local_port":1080,
"password":"Passw0rd",
"timeout":120,
"method":"aes-256-cfb",
"protocol":"auth_chain_a",
import json
import matplotlib.pyplot as plt
import numpy as np
from shapely.geometry.polygon import LineString
from shapely.geometry.point import Point
def plot_line(ax, ob, color='black', linestyle='-'):
x, y = ob.xy
ax.plot(x,
y,
// ==UserScript==
// @name IVE Att & Abs Calculator
// @namespace https://ive.miklet.pro
// @version 4.0.3
// @description Precisly determine and control the time you can miss.
// @author Miklet
// @license MIT
// @match *://myportal.vtc.edu.hk/*
// @match *://ive.miklet.pro/*
// @require https://code.jquery.com/jquery-latest.js
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>IVE出席率及缺席率計算器</title> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" integrity="sha256-NuCn4IvuZXdBaFKJOAcsU2Q3ZpwbdFisd5dux4jkQ5w=" crossorigin="anonymous"/> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous"/> <script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script> <s
/*
Copyright (C) 2017 Miklet
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTH