Skip to content

Instantly share code, notes, and snippets.

View lexer's full-sized avatar

Aleksei Zakharov lexer

View GitHub Profile
lexer / OkHttpRequest
Created May 29, 2013 11:35
Google Http Client Library OkHttp Transport
* Copyright (c) 2010 Google Inc.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
lexer / connection.getParsedTransaction
Last active January 16, 2023 17:51
VersionedTransactionResponse vs ParsedTransactionWithMeta
lexer / Client.js
Created May 8, 2011 19:08
Node pubsub server based on and redis
var client = new Pubsub({
port: 8000
client.on("connect", function() {
client.subscribe("trololo", function(data){
console.log('Received a message from the server: ' + data);
import org.junit.Test;
import org.junit.runner.JUnitCore;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
public class Solution {
Non-fatal Exception: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
at android.os.Handler.<init>(
at android.os.Handler.<init>(
at com.instabug.library.invoker.b.<init>(
at com.instabug.library.internal.module.a.a(
at com.instabug.library.i.b(
at com.instabug.library.i.<init>(
at com.instabug.library.Instabug$
at com.instabug.library.Instabug$
lexer / gist:1564029
Created January 5, 2012 06:36
sudo chmod 600 ~/.ssh/id_rsa
sudo chmod 600 ~/.ssh/
sudo chmod 644 ~/.ssh/known_hosts
sudo chmod 755 ~/.ssh
var zimride = require('./zimride');
var pointA = {lat: 55.157199, lng: 61.364264};
var pointB = {lat: 55.15791, lng: 61.38864};
var pointC = {lat: 55.153472, lng: 61.364779};
var pointD = {lat: 55.153864, lng: 61.381688};
console.log(zimride.getMinDetourDistance(pointA, pointB, pointC, pointD));