Skip to content

Instantly share code, notes, and snippets.

View derekhe's full-sized avatar
🎯
Focusing

hesicong derekhe

🎯
Focusing
View GitHub Profile
@coolaj86
coolaj86 / google-to-bing-maps.js
Created April 9, 2012 21:38
convert coords from google maps to bing maps
// Believe it or not, Microsoft has this documented:
// http://msdn.microsoft.com/en-us/library/bb259689.aspx
function toBing(x, y, zoom) {
var x2 = pad(String(x.toString(2)), zoom + 1)
, y2 = pad(String(y.toString(2)), zoom + 1)
, quadkey = ''
;
function pad(n, p) {
@pwlin
pwlin / gist:8a0d01e6428b7a96e2eb
Last active June 27, 2024 09:13
Android : add cert to system store
https://code.google.com/p/android/issues/detail?id=32696#c5
If you have a certificate that is not
trusted by Android, when you add it, it goes in the personal cert store.
When you add a cert in this personal cert store, the system requires a
higher security level to unlock the device. But if you manage to add your
cert to the system store then you don't have this requirement. Obviously,
root is required to add a certificate to the system store, but it is quiet
easy.
@zparnold
zparnold / one_liner.sh
Last active June 25, 2024 07:12
A simply script to delete all failed pods from Kubernetes
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod