Skip to content

Instantly share code, notes, and snippets.

View phuwn's full-sized avatar
🎯
Focusing

Phuong phuwn

🎯
Focusing
View GitHub Profile
function drawArrow(
ctx: CanvasRenderingContext2D,
fromx: number,
fromy: number,
tox: number,
toy: number,
color = "white"
) {
const headlen = 5
const arrowWidth = 5
function drawHexagon(
ctx: CanvasRenderingContext2D,
cx: number,
cy: number,
color = "white"
) {
strokeRoundedPath(ctx, cx, cy, hexagon, 15, color, 4, 7 / 20)
}
interface Point {
import { CanvasRenderingContext2D, createCanvas } from "canvas"
function renderStar(ctx: CanvasRenderingContext2D, cx: number, cy: number) {
const spikes = 5
const outerRadius = 30
const innerRadius = 20
const lineWidth = 7
const strokeStyle = "#f4f4f5"
let rot = (Math.PI / 2) * 3
let x = cx
Function BoDau(ByVal noiDung As String) As String
Dim i As Long
Dim iMa As Long
Dim sChar As String
Dim nChuyen As String
BoDau = AscW(noiDung)
For i = 1 To Len(noiDung)
sChar = Mid(noiDung, i, 1)
If sChar <> "" Then
iMa = AscW(sChar)
@phuwn
phuwn / setup-a-commit-a-day-heroku.sh
Created March 14, 2021 09:47
Heroku a-commit-a-day setup script
# Go to your terminal, clone this repo
git clone https://github.com/phuwn/a-commit-a-day.git
cd a-commit-a-day
# Connect to Heroku and setup your app
heroku login
heroku git:remote -a a-commit-a-day
# Set buildpack for our app, since my script are shell script, so...
heroku buildpacks:set https://github.com/niteoweb/heroku-buildpack-shell.git

Keybase proof

I hereby claim:

  • I am phuwn on github.
  • I am phuwn (https://keybase.io/phuwn) on keybase.
  • I have a public key ASBpe8pNbvL0zVJMgB30x-AqyqNCxUZigXU3Lkbh5CUPzwo

To claim this, I am signing this object: