Skip to content

Instantly share code, notes, and snippets.

View hoseinit's full-sized avatar

Sam Hamedi hoseinit

  • PAYBACK GmbH
  • Munich
View GitHub Profile
@hoseinit
hoseinit / install-and-configure-shadowsocks-server.sh
Created April 16, 2017 15:47 — forked from euyuil/install-and-configure-shadowsocks-server.sh
Shadowsocks: Server installation and configuration on Ubuntu 14.04.
#!/bin/bash
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get install -y python-gevent python-pip python-m2crypto supervisor
sudo pip install shadowsocks
sudo mkdir -p touch /etc/shadowsocks
@hoseinit
hoseinit / DialogFragmentCallback.md
Created November 16, 2015 12:46 — forked from Joev-/DialogFragmentCallback.md
Getting results from DialogFragment to calling Fragment using Callbacks

##Getting results from DialogFragments to another Fragment.

When setting up the DialogFragment make a call to Fragment.setTargetFragment()
Then from DialogFragment you can access the main fragment with Fragment.getTargetFragment()
Use interfaces to provide the required actions to the calling Fragment.

##Example code.

###AddFriendDialogFragment - Calls back to calling fragment.