Skip to content

Instantly share code, notes, and snippets.

Siu Ching Pong -Asuka Kenji- asukakenji

Block or report user

Report or block asukakenji

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@asukakenji
asukakenji / deriving_trigonometry_formulae.ipynb
Last active Oct 1, 2019
Deriving Trigonometry Formulae
View deriving_trigonometry_formulae.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@asukakenji
asukakenji / solving_sin_z_equals_2.ipynb
Last active Sep 29, 2019
Solving sin(𝑧)=2 (Trigonometric Equations with Complex Numbers)
View solving_sin_z_equals_2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@asukakenji
asukakenji / main.swift
Created Nov 29, 2018
Minimal Swift 4.2 GUI Application without Xcode
View main.swift
import AppKit
let app = NSApplication.shared
app.setActivationPolicy(.regular)
let window = NSWindow(
contentRect: NSMakeRect(0, 0, 640, 480),
styleMask: [.titled, .closable],
backing: .buffered,
defer: true
@asukakenji
asukakenji / docker-pull-golang.sh
Last active Nov 23, 2018
Pulling (downloading) all official releases (versions) of Go (Golang) images from Docker Hub
View docker-pull-golang.sh
#!/bin/bash
# The first release available is golang:1.2.0
major=1
minor=2
patch=0
while true
do
while true
@asukakenji
asukakenji / go-stdlib-interface-selected.md
Last active May 26, 2020
Go (Golang) Standard Library Interfaces (Selected)
View go-stdlib-interface-selected.md

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.

@asukakenji
asukakenji / go-os-arch.md
Last active May 28, 2020
Go (Golang) GOOS and GOARCH
View go-os-arch.md

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.8.3 darwin/amd64.

A list of valid GOOS values

(Bold = supported by go out of the box, ie. without the help of a C compiler, etc.)

  • android
  • darwin
@asukakenji
asukakenji / try_shiny_2.go
Last active Feb 17, 2020
Shortest GUI program written in Golang. It displays a window and exits when the "close" button of the window is clicked.
View try_shiny_2.go
// Shortest GUI program written in Golang.
// It displays a window and exits when the "close" button of the window is clicked.
package main
import (
"golang.org/x/exp/shiny/driver"
"golang.org/x/exp/shiny/screen"
// Despite that the package names have a "mobile" prefix,
// these packages works on desktop.
@asukakenji
asukakenji / try_shiny.go
Created Jul 31, 2017
Shortest GUI program written in Golang. It displays a window and exits after 5 seconds.
View try_shiny.go
// Shortest GUI program written in Golang.
// It displays a window and exits after 5 seconds.
package main
import (
"time"
"golang.org/x/exp/shiny/driver"
"golang.org/x/exp/shiny/screen"
)
View loop3.go
func (bt *BlinkyTape) playPattern(p Pattern, delay time.Duration) {
bt.clear()
L:
for _, frame := range p {
bt.setFrame(frame)
if err := bt.render(); err != nil {
log.Fatalf("render error: %s\n", err)
}
You can’t perform that action at this time.