Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Hanis hanishassim

🎯
Focusing
View GitHub Profile
@hanishassim
hanishassim / RoundedCorners.swift
Created Feb 23, 2020
Superclass to create rounded UIView (alternative to SmoothedView)
View RoundedCorners.swift
//
// RoundedCorners.swift
//
// Created by H on 23/02/2020.
// Copyright © 2020 H. All rights reserved.
//
import UIKit
protocol RoundedCorners {
@hanishassim
hanishassim / SmoothedView.swift
Created Feb 23, 2020
Superclass to create a smooth rounded UIView, works for animated rounded view too
View SmoothedView.swift
//
// SmoothedView.swift
//
// Created by H on 23/02/2020.
// Copyright © 2020 H. All rights reserved.
//
import UIKit
final class SmoothedView: UIView {
@hanishassim
hanishassim / iOS.8.3.txt
Created Dec 26, 2018 — forked from steakknife/iOS.8.3.txt
iOS UIFont names
View iOS.8.3.txt
UIFont: family Thonburi
UIFont: font Thonburi-Bold
UIFont: font Thonburi
UIFont: font Thonburi-Light
UIFont: family Khmer Sangam MN
UIFont: font KhmerSangamMN
UIFont: family Snell Roundhand
UIFont: font SnellRoundhand-Black
UIFont: font SnellRoundhand-Bold
UIFont: font SnellRoundhand
View gist:9023a3a8b1765e04e2c63ea78d578489

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@hanishassim
hanishassim / timeago.swift
Last active Nov 1, 2018
Time Ago Swift Date Extension
View timeago.swift
//Credit to https://gist.github.com/merlos All copyright & credit goes to him
import Foundation
extension Date {
///
/// Provides a humanised date. For instance: 1 minute, 1 week ago, 3 months ago
///
/// - Parameters:
// - numericDates: Set it to true to get "1 year ago", "1 month ago" or false if you prefer "Last year", "Last month"
@hanishassim
hanishassim / install-wakatime.sh
Last active Aug 26, 2019
wakatime install path
View install-wakatime.sh
#!/usr/bin/env bash
set -euo pipefail
set +e
xcrun xcodebuild -version > /dev/null 2>/dev/null
RESULT="$?"
set -e
if [ $RESULT != 0 ]; then
sudo xcode-select --reset
@hanishassim
hanishassim / NYSKeyboardHelper.swift
Created Sep 20, 2018 — forked from louisdh/NYSKeyboardHelper.swift
A Keyboard helper for your Swift Keyboard troubles.
View NYSKeyboardHelper.swift
//
// NYSKeyboardHelper.swift
// B-NYS GCV
//
// Created by Matthias Nys on 18/03/2017.
// Copyright © 2017 B-NYS. All rights reserved.
//
import UIKit
@hanishassim
hanishassim / ssh_tunnel.sh
Created May 16, 2017 — forked from belo82/ssh_tunnel.sh
SSH tunnel from local port 9200 to remote port 9200 (-f: run in background -N: don't execute command in remote system)
View ssh_tunnel.sh
ssh -f -L 9201:localhost:9200 <username>@<host> -N
# To kill tunnel running in background run:
ps aux | grep 9201
kill <pid>