I hereby claim:
- I am ruiwen on github.
- I am ruiwen (https://keybase.io/ruiwen) on keybase.
- I have a public key ASC6hOGJ6j8XRLof2za5Fe_gXhtXOOo42WrNt_6tH-W3Bwo
To claim this, I am signing this object:
package com.thoughtmonkeys.pitstop; | |
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.content.res.Resources; | |
import android.graphics.RectF; | |
import android.os.Build; | |
import android.text.Layout.Alignment; | |
import android.text.StaticLayout; | |
import android.text.TextPaint; |
# Obtaining server certificate | |
openssl s_client -CAfile ca.crt -connect "server.domain.com:443" < /dev/null 2> /dev/null | openssl x509 -outform PEM > server.crt | |
# You may get an error like the following | |
# CONNECTED(00000003) | |
# 140048174458520:error:140790E5:SSL routines:ssl23_write:ssl handshake failure:s23_lib.c:177: | |
# --- | |
# no peer certificate available | |
# --- | |
# No client certificate CA names sent |
function rainbow(numOfSteps, step) { | |
// based on http://stackoverflow.com/a/7419630 | |
// This function generates vibrant, "evenly spaced" colours (i.e. no clustering). This is ideal for creating easily distiguishable vibrant markers in Google Maps and other apps. | |
// Adam Cole, 2011-Sept-14 | |
// HSV to RBG adapted from: http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript | |
var r, g, b; | |
var h = step / numOfSteps; | |
var i = ~~(h * 6); | |
var f = h * 6 - i; | |
var q = 1 - f; |
''' | |
Sample object: | |
{ | |
"url": "/1/functions/Klass3", | |
"_id": { | |
"$oid": "506c082701d5410ec7000002" | |
}, | |
"log": [ | |
{ |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// Facebook SDK | |
angular.module('facebook', []) | |
.directive('fb', ['$FB', function($FB) { | |
return { | |
restrict: "E", | |
replace: true, | |
template: "<div id='fb-root'></div>", | |
compile: function(tElem, tAttrs) { | |
return { | |
post: function(scope, iElem, iAttrs, controller) { |
package com.thoughtmonkeys.pitstop; | |
import java.util.ArrayList; | |
import java.util.List; | |
import android.content.Context; | |
import android.graphics.Paint; | |
import android.util.AttributeSet; | |
import android.util.Log; |
# Bash function to translate redis commands to their pipelined equivalent | |
# | |
# eg. | |
# | |
# $ redis_p HMSET key value key1 value1 | |
# *5 | |
# $5 | |
# HMSET | |
# $3 | |
# key |
Unit
lister
s rm_prefs
into self.hm_prefs
rm_prefs
and hm_prefs
User
rm_prefs
-> hm_prefs
(ie. copy values over)
rm_prefs
on User if need beuser.personal
attributes onto user
(top-level)
age = IntField()
gender = StringField(choices=['male', 'female', 'third'], default="female")