Skip to content

Instantly share code, notes, and snippets.

View loihd's full-sized avatar

Loi Ho loihd

View GitHub Profile
@loihd
loihd / iterm2.md
Created March 31, 2022 14:11 — forked from squarism/iterm2.md
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
/**
* Copyright 2019 Coinbase, Inc.
*
* Licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
//
// ValueWrapper.swift
// ADKATech.com
//
// Created by Amr Elghadban on 9/20/18.
// Copyright © 2018 Mobile DevOps. All rights reserved.
//
import Foundation
@loihd
loihd / ruby.2.4.1-setup.sh
Created March 5, 2018 05:33 — forked from mustafaturan/ruby.2.6.3-setup.sh
ruby 2.4.1 setup for centos 6.x
#!/usr/bin/env bash
# repository
cd /tmp
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm
# system update
yum -y update
yum -y groupinstall "Development Tools"
yum -y install libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-devel zlib-devel openssl-devel libyaml-devel readline-devel curl-devel openssl-devel pcre-devel git memcached-devel valgrind-devel mysql-devel ImageMagick-devel ImageMagick
@loihd
loihd / FRP iOS Learning resources.md
Created December 13, 2017 05:02 — forked from JaviLorbada/FRP iOS Learning resources.md
The best FRP iOS resources.

Videos

@loihd
loihd / KotlinFunctions.md
Created November 1, 2017 12:55 — forked from cbeyls/KotlinFunctions.md
Comparison of Kotlin functions: also, apply, let, run, with
Function Function type Target passed as Returns
also Extension it Target
apply Extension this Target
let Extension it Block return value
run Extension this Block return value
with Regular this Block return value
@loihd
loihd / Laravel PHP7 LEMP AWS.md
Created October 22, 2017 03:25 — forked from santoshachari/Laravel PHP7 LEMP AWS.md
Laravel 5.x on Ubuntu 16.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip

Keyboard Shortcuts in Xcode

Listed below are the various keyboard shortcuts in Xcode 7. Symbols corresponding to Mac keyboard used are command (⌘), shift (⇧), control (⌃), option/alt (⌥)

Build, Run, Test

  • Build ⌘ + B
  • Clean ⌘ + ⇧ + K
  • Run Tests ⌘ + U
  • Run ⌘ + R
@loihd
loihd / UtilsUISystem.java
Created November 8, 2016 15:24 — forked from mypplication/UtilsUISystem.java
UtilsUISystem Android
import android.app.UiModeManager;
import android.content.Context;
import android.content.res.Resources;
import android.os.Build;
import android.util.Log;
import android.util.TypedValue;
import tv.recatch.library.R;
public class UtilsUISystem
@loihd
loihd / AES256Cipher.java
Created October 12, 2015 03:50 — forked from dealforest/AES256Cipher.java
AES256 encryption on Android
package net.dealforest.sample.crypt;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.security.InvalidKeyException;