Skip to content

Instantly share code, notes, and snippets.

View makzan's full-sized avatar
🎯
Focusing

Thomas Seng Hin Mak makzan

🎯
Focusing
View GitHub Profile
@makzan
makzan / Command to merge branch
Created September 25, 2021 12:58
Command to merge branch in Git version control
$ git checkout feature_a
$ git merge master
@makzan
makzan / Code snippet to create new branch
Created September 25, 2021 12:56
Code snippet to create new branch In Git Version Control
git switch -c new_feature
@makzan
makzan / gist:b39259819afd782019db6b8ef9888225
Created September 25, 2021 12:50
Example of adding an empty folder to git version control
$ mkdir images
$ touch images/.gitkeep
$ git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
images/
commit b0d3c42d003152d1195a299ee5a11bb7b82c07d4 (HEAD -> development)
Author: Thomas Seng Hin Mak <mak@makzan.net>
Date: Wed Mar 10 20:55:54 2021 +0800
Example commit.
@makzan
makzan / flexbox-layout.css
Created April 30, 2021 08:33
Flexbox-based mobile-first CSS layout
*{box-sizing: border-box;}
img {max-width: 100%;}
.row {
display: flex;
flex-wrap: wrap;
}
.row .row {
margin-left: -.5em;
margin-right: -.5em;
}
@makzan
makzan / package.json
Created October 30, 2020 08:38
mobile-web-2020-test-suite
{
"name": "mobile-web-2020-test-suite",
"version": "1.0.0",
"description": "Automated test cases for mobile web technologies competition 2020",
"devDependencies": {
"axe-core": "^4.0.2",
"cy-mobile-commands": "^0.2.1",
"cypress": "^5.0",
"cypress-axe": "0.8.1",
"cypress-commands": "^1.1.0",
@makzan
makzan / Remark.txt
Last active September 3, 2020 22:22
Comparing an article written in AsciiDoc and Markdown.
1. I like the AsciiDoc that uses `+` to connect paragraphs inside list item, instead of adding indent in markdown.
2. The URL example `:1:` in AsciiDoc looks similar to `[1]` in markdown. But actually `:1:` is a variable that can be used any where.
3. This is just a simple comparasion for a simple document. I find markdown is good enough for a short article writing. On the other hands, AsciiDoc is better for longer writings.
@makzan
makzan / index.html
Created November 23, 2014 03:56
Very basic TODO list with jQuery and LocalStorage // source http://jsbin.com/gorena
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="TODO List Example" />
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<meta charset="utf-8">
<title>TODO List</title>
<style id="jsbin-css">
.templates {
display: none;
@makzan
makzan / ViewController.swift
Created April 9, 2019 05:13
Demo on uploading image to PHP from Alamofire
//
// ViewController.swift
// Upload Image Example
//
import UIKit
import Alamofire
class ViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate {
import Foundation
class Student {
var enrolledAt:Date = Date()
init(enrolledAt:String) {
let dateFormatter = ISO8601DateFormatter()
dateFormatter.formatOptions = .withFullDate
self.enrolledAt = dateFormatter.date(from: enrolledAt)!
}