Skip to content

Instantly share code, notes, and snippets.

View wching's full-sized avatar
😶‍🌫️

Samantha Ching wching

😶‍🌫️
View GitHub Profile
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
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"
@un33k
un33k / vmware_fusion_shared_folder.txt
Last active September 1, 2020 10:05
Enable Shared Folders on vmware Fusion 4.x, 5.x & 6.x (Linux Ubuntu 12.x as guest OS)
Enable Shared Folders on vmware Fusion (4.x)+ (Example OS: Linux Ubuntu 12.x as guest OS)
1. First update your linux system:
sudo apt-get update
sudo apt-get install -y build-essential
sudo aptitude -y safe-upgrade
2. Reboot your system just in case you have a new kernel
sudo shutdown -r now
@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@adamgibbons
adamgibbons / install-mongodb.md
Last active January 17, 2023 15:17
Install MongoDB on Mac OS X 10.9

Install MongoDB with Homebrew

brew install mongodb
mkdir -p /data/db

Set permissions for the data directory

Ensure that user account running mongod has correct permissions for the directory:

@dragonjet
dragonjet / 1-server.md
Last active July 31, 2021 21:01
Setup Web Server on EC2 Amazon Linux AMI

Step 1: Server Credentials

This assumes you are now connected to the server via SSH.

  • sudo -s Enter root mode for admin access
  • groupadd devgroup Create new group to be later granted access to /var/www/html

Creating a new Root User

  • useradd -G root,devgroup masterdev Create new root user. Also add to the devgroup
  • passwd masterdev Change password for the new root user
  • At this point, you'll need to input your new root user's new password
@donnfelker
donnfelker / android-19-circle.yml
Last active March 12, 2021 13:19
Sample CircleCI Configuration For an Android App
#
# Build configuration for Circle CI
#
general:
artifacts:
- /home/ubuntu/your-app-name/app/build/outputs/apk/
machine:
environment:
@brysgo
brysgo / gist:0183a8dded41b1356107
Last active December 27, 2015 23:08 — forked from zmalltalker/gist:5900206
Install ruby-install, chruby and ruby 2.2.0 on Centos - Install puppet - Run `puppet apply <(curl -S https://gist.githubusercontent.com/brysgo/0183a8dded41b1356107/raw/103f4a87ecd143285da444c4e5c24b70680256cb/gistfile1.pp)`
# chruby
# ruby-install
# ruby 2.2.0
# /etc/profile.d/chruby.sh
Exec {
path => ["/bin","/usr/bin", "/usr/local/bin"]
}
file { "/etc/profile.d/chruby.sh":
ensure => present,
@tsuharesu
tsuharesu / AddCookiesInterceptor.java
Last active April 11, 2024 12:37
Handle Cookies easily with Retrofit/OkHttp
/**
* This interceptor put all the Cookies in Preferences in the Request.
* Your implementation on how to get the Preferences MAY VARY.
* <p>
* Created by tsuharesu on 4/1/15.
*/
public class AddCookiesInterceptor implements Interceptor {
@Override
public Response intercept(Chain chain) throws IOException {
@hrules6872
hrules6872 / SpaceItemDecoration.java
Last active April 25, 2020 12:04
Space ItemDecoration for RecyclerView
public class SpaceItemDecoration extends RecyclerView.ItemDecoration {
private static final boolean DEFAULT_ADD_SPACE_ABOVE_FIRST_ITEM = false;
private static final boolean DEFAULT_ADD_SPACE_BELOW_LAST_ITEM = false;
private final int space;
private final boolean addSpaceAboveFirstItem;
private final boolean addSpaceBelowLastItem;
public SpaceItemDecoration(int space) {
this(space, DEFAULT_ADD_SPACE_ABOVE_FIRST_ITEM, DEFAULT_ADD_SPACE_BELOW_LAST_ITEM);
@VladSumtsov
VladSumtsov / ScreenPagerStateAdapter.java
Created July 20, 2016 19:06
Flow mortar ViewPager Adapter with save state. Logic of saving state took from FragmentStatePagerAdapter.
package com.ghm.ui.adapter;
import android.content.Context;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.v4.view.PagerAdapter;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;