Skip to content

Instantly share code, notes, and snippets.

View faizmokh's full-sized avatar
🏠
Working from home

Faiz Mokhtar faizmokh

🏠
Working from home
View GitHub Profile
@faizmokh
faizmokh / SwiftElmFrameworkList.md
Created August 17, 2017 02:48 — forked from inamiy/SwiftElmFrameworkList.md
React & Elm inspired frameworks in Swift
defmodule App.ChangesetView do
use App, :view
@doc """
Traverses and translates changeset errors.
See `Ecto.Changeset.traverse_errors/2`
"""
def translate_errors(changeset) do
Ecto.Changeset.traverse_errors(changeset, &translate_error/1)
end
@faizmokh
faizmokh / Birthdate Parser.js
Created June 19, 2017 04:06 — forked from crynobone/Birthdate Parser.js
Malaysia Indentification Card Number to Birthdate
var ic = '090303086521';
if(ic.match(/^(\d{2})(\d{2})(\d{2})-?\d{2}-?\d{4}$/)) {
var year = RegExp.$1;
var month = RegExp.$2;
var day = RegExp.$3;
console.log(year, month, day);
var now = new Date().getFullYear().toString();
@faizmokh
faizmokh / ladder.md
Created June 11, 2017 11:00 — forked from jamtur01/ladder.md
Kickstarter Engineering Ladder
@faizmokh
faizmokh / Appfile
Created March 24, 2017 07:45 — forked from mmazzarolo/Appfile
Simple Fastlane setup for React-Native (Android - iOS)
# iOS
app_identifier "com.myapp.app" # The bundle identifier of your app
apple_id "me@gmail.com" # Your Apple email address
team_id "1234ABCD" # Developer Portal Team ID
# Android
json_key_file "./google-play-api-secret.json" # Path to the json secret file - Follow https://github.com/fastlane/supply#setup to get one
package_name "com.myapp.app" # Your Android app package
@faizmokh
faizmokh / meta-tags.md
Created March 10, 2017 03:14 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@faizmokh
faizmokh / meta-tags.md
Created March 10, 2017 03:14 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@faizmokh
faizmokh / tmux.conf
Created January 1, 2017 07:04 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@faizmokh
faizmokh / NibLoadingView.swift
Created August 22, 2016 09:56
UIView subclass for automatic loading of associated Xib
import UIKit
// Usage: Subclass your UIView from NibLoadView to automatically load a xib with the same name as your class
protocol NibDefinable {
var nibName: String { get }
}
@IBDesignable
class NibLoadingView: UIView, NibDefinable {
@faizmokh
faizmokh / seo.html
Created August 9, 2016 02:20
Essential SEO HTML Tags
<!-- Essential META Tags -->
<meta property="og:title" content="European Travel Destinations">
<meta property="og:description" content="Offering tour packages for individuals or groups.">
<meta property="og:image" content="http://euro-travel-example.com/thumbnail.jpg">
<meta property="og:url" content="http://euro-travel-example.com/index.htm">
<meta name="twitter:card" content="summary_large_image">
<!-- Non-Essential, But Recommended -->
<meta name="og:site_name" content="European Travel, Inc.">