Skip to content

Instantly share code, notes, and snippets.

View z0lope0z's full-sized avatar

Lope Chupijay Emano z0lope0z

View GitHub Profile
@z0lope0z
z0lope0z / gist:fe211d4c07975ff5f692
Created November 28, 2014 03:01
Getting geo coordinates from old google maps API using Cell Tower ID, Location Area Code, Mobile Country Code, and Mobile Network Code
/**
* Shamelessly extracted from
* https://code.google.com/p/mwop/source/browse/sandbox/server/mwop-server/src/com/mwop/server/cellID/CellIDResolver.java?r=18
*/
public static Coordinate transform(int cellID, int lac, int mcc, int mnc) throws IOException {
URL providerAddress = new URL("http://www.google.com/glm/mmap");
HttpURLConnection connection = (HttpURLConnection) providerAddress.openConnection();
connection.setRequestMethod("POST");
connection.setDoOutput(true);
connection.connect();
@z0lope0z
z0lope0z / gist:3cb7cb0bb7fb2396fabc
Created November 15, 2014 14:01
Getting Android Studio 0.9.2 to work on Xmonad 0.10
-- from https://plus.google.com/+JamesBrotchie/posts/2PQtFTf548F
import XMonad.Hooks.ICCCMFocus
...
, logHook = do
takeTopFocus
dynamicLogWithPP xmobarPP
...
or upgrade to 0.11 lol