Skip to content

Instantly share code, notes, and snippets.

@bigdragon1977
bigdragon1977 / DatePickerDialogFragment.java
Created March 26, 2016 06:57 — forked from davidcesarino/DatePickerDialogFragment.java
DatePickerDialogFragment to work around Android Issue 34833 on affected versions (>= JELLY_BEAN && < LOLLIPOP).
/*
* Copyright 2012 David Cesarino de Sousa
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@bigdragon1977
bigdragon1977 / leaflet_numbered_markers.css
Created March 25, 2016 16:20 — forked from comp615/leaflet_numbered_markers.css
Numbered Markers in Leaflet (JS Mapping)
.leaflet-div-icon {
background: transparent;
border: none;
}
.leaflet-marker-icon .number{
position: relative;
top: -37px;
font-size: 12px;
width: 25px;
@bigdragon1977
bigdragon1977 / EditableCircleMarker.js
Created March 25, 2016 15:05 — forked from glenrobertson/EditableCircleMarker.js
leaflet editable circle with marker
/*
L.EditableCircleMarker is a marker with a radius
The marker can be moved and the radius can be changed
*/
L.EditableCircleMarker = L.Class.extend({
includes: L.Mixin.Events,
options: {
weight: 1,
/*
gcc -Wall -pedantic -std=c99 -O2 -o timegm timegm.c
Test manual epoch calculation with tm_yday vs TZ+mktime.
On Linux, gcc 4.4.7, the manual method is ~5x faster.
Usage:
./timegm
<ctrl-C> to quit
@bigdragon1977
bigdragon1977 / ctags.vim
Last active August 29, 2015 14:09 — forked from agateau/ctags.vim
" ctags.vim: Display function name in the title bar and/or status line.
" Author: Alexey Marinichev <[email protected]>
" Maintainer: Gary Johnson <[email protected]>
" Contributor: Keith Reynolds
" Last Change: 2003-11-26 00:23:22
" Version: 2.1
" URL(1.0): http://vim.sourceforge.net/scripts/script.php?script_id=12
" URL(>=2.0): http://vim.sourceforge.net/scripts/script.php?script_id=610
" DETAILED DESCRIPTION:

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
import spray.json._
import reactivemongo.bson._
import reactivemongo.bson.handlers.{ BSONReader, BSONWriter, RawBSONWriter }
import scala.util.{ Try, Success, Failure }
import org.apache.commons.codec.binary.Hex
import org.joda.time.format.ISODateTimeFormat
import org.joda.time.{ DateTime, DateTimeZone }
import java.nio.ByteBuffer
import org.jboss.netty.buffer.ChannelBuffers
QDateTime timeConvertor;
QString customDateString = "14-Nov-2010 05:27:03 +0100";
QString dateTime = customDateString.left(20);
int timezoneOffset = customDateString.right(5).left(3).toInt();
timeConvertor = QDateTime::fromString(dateTime, "dd-MMM-yyyy HH:mm:ss");
// Mark this QDateTime as one with a certain offset from UTC, and set that
// offset.
timeConvertor.setTimeSpec(Qt::OffsetFromUTC);
import scala.actors.Actor
import scala.actors.Actor._
import javax.mail._
import javax.mail.internet._
import java.util.Properties._
case class Request(sender : Actor, payload : String)
case class Ready(sender : Actor)
case object Stop
object Client extends Application {