Skip to content

Instantly share code, notes, and snippets.

@MSAJJAN-EEOC
MSAJJAN-EEOC / multiple_ssh_setting.md
Created August 29, 2017 21:55 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@MSAJJAN-EEOC
MSAJJAN-EEOC / object-equal.md
Last active March 8, 2018 15:48
Check if two arrays or objects are equal with JavaScript

What we need to compare

You could have a simple array, like this one.

var arr = [1, 2, 3, 4, 5];

Or, you could have a complex, multidimensional array with various types of inputs.

var arr = [1, 'something', 3, {
	item1: 42,
	item2: 'another thing',

item3: function () {

@MSAJJAN-EEOC
MSAJJAN-EEOC / whatsapp-image-compression
Created April 9, 2018 15:51 — forked from akshay1188/whatsapp-image-compression
Whatsapp like image compression
- (UIImage *)compressImage:(UIImage *)image{
float actualHeight = image.size.height;
float actualWidth = image.size.width;
float maxHeight = 600.0;
float maxWidth = 800.0;
float imgRatio = actualWidth/actualHeight;
float maxRatio = maxWidth/maxHeight;
float compressionQuality = 0.5;//50 percent compression
if (actualHeight > maxHeight || actualWidth > maxWidth) {

Disable HTML Form Input Autocomplete and Autofill

  1. Add autocomplete="off" onto <form> element;
  2. Add hidden <input> with autocomplete="false" as a first children element of the form.
<form autocomplete="off" method="post" action="">
    <input autocomplete="false" name="hidden" type="text" style="display:none;">
    ...