I hereby claim:
- I am niftynei on github.
- I am niftynei (https://keybase.io/niftynei) on keybase.
- I have a public key whose fingerprint is 2650 32C4 4A7D 47F1 519B 1A4C 1F62 C1C0 E516 DDF5
To claim this, I am signing this object:
public class CreateUserRequest extends ClientNetworkRequest<User, Object> { | |
// ... | |
@Override | |
public NetworkCallResponse<Object> onMakeRequest() throws IOException { | |
EoLog.d(TAG, "Register a user called"); | |
String bearerString = ClientAuthManager.get().createBearerString(); | |
retrofit.Response<User> userResponse = EoApp.getAppContext() | |
.getClientRequestManager() |
public class CreateUserRequest extends NetworkRequest<User> { | |
// ... | |
@Override | |
public User onMakeRequest() { | |
String bearerString = ClientAuthManager.get().createBearerString(); | |
// Make a request to create a user object. | |
User user = EoApp.getAppContext().getClientRequestManager().getAuthApiService().createUser(bearerString, mNewUser); |
public <ReturnType> NetworkRequest<ReturnType> makeRequest(NetworkRequest<ReturnType> request) { | |
try { | |
request.makeRequest(); | |
// if you reach this, request succeeded! | |
request.setStatus(HttpURLConnection.HTTP_OK, NetworkRequest.Status.SUCCESS); | |
return request; | |
} catch (RetrofitError error) { | |
Response errorResponse = error.getResponse(); |
0. # make a snapshot of prod in EC2. jic. | |
1. # rsync your file from staging | |
2. sudo django-admin.py collectstatic -v0 --noinput | |
3. sudo django-admin.py syncdb | |
4. sudo vim webapp/graphite/local_settings.py ## TODO: move stuff to env vars | |
5. sudo apachectl -k stop | |
6. sudo apachectl -k start | |
7. # delete your snapshot |
# ~~Caveat Emptor~~ | |
# This is a rough approximation of the steps I used to setup graphite on an Amazon EC2 instance | |
# No guarantees that it works. Also note that since you'll pulling graphite from source, there's a good possibility | |
# that the setup instructions have changed. | |
## Due diligence: many thanks are owed to the following tutorials & docs: | |
# https://www.digitalocean.com/community/tutorials/installing-and-configuring-graphite-and-statsd-on-an-ubuntu-12-04-vps | |
# https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-centos-7 | |
# http://graphite.readthedocs.org/en/latest/releases/0_10_0.html | |
# https://timsvirtualworld.com/2013/05/how-to-install-graphite-on-amazon-linux/ |
$ which python | |
/usr/bin/python | |
$ sudo which python | |
/usr/bin/python | |
$ python -c "import cairo; print cairo.version" | |
1.10.0 | |
$ sudo python -c "import cairo; print cairo.version" | |
Traceback (most recent call last): | |
File "<string>", line 1, in <module> | |
File "/usr/local/lib/python2.7/site-packages/cairo/__init__.py", line 1, in <module> |
/** | |
* Utility to start an image picker with request code | |
* | |
* @param activity Activity that will receive result | |
* @param requestCode requestCode for result | |
*/ | |
public static void pickImage(Activity activity, int requestCode, Uri cameraPhotoUri) { | |
if (activity.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY)) { | |
Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); | |
Intent imageOnDiskIntent = new Intent(Intent.ACTION_GET_CONTENT).setType("image/*"); |
package com.electricobjects.client.collections; | |
import android.animation.Animator; | |
import android.animation.AnimatorListenerAdapter; | |
import android.animation.ObjectAnimator; | |
import android.app.Activity; | |
import android.support.v7.widget.RecyclerView; | |
import android.text.Editable; | |
import android.text.Layout; | |
import android.text.Spannable; |
package com.electricobjects.client.login; | |
import android.annotation.TargetApi; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.os.Build; | |
import android.os.SystemClock; | |
import android.text.Html; | |
import android.text.InputType; | |
import android.text.Spannable; |
I hereby claim:
To claim this, I am signing this object: