Skip to content

Instantly share code, notes, and snippets.

@colek42
colek42 / gist:97b974869acaff5a07e3
Created December 6, 2015 01:38
git hub cheat sheet
luisbg
@luisbg
luis@debethencourt.com
Ohloh profile for Luis de Bethencourt
Blogalia
@colek42
colek42 / 0_reuse_code.js
Created January 7, 2016 23:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
//Paste this into http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html replacing exisiting code
var date = new Cesium.JulianDate.now();
var outObj = []
for(var i = 0; i < 100; i++){
var rand = Math.floor((Math.random() * 10000000) + 1);
var newDate = new Cesium.JulianDate();
Cesium.JulianDate.addMinutes(date, rand, newDate);
outObj.push({
ISO: Cesium.JulianDate.toIso8601(newDate),
import re
import codecs
import base64
import os
from Tkinter import *
from tkMessageBox import showinfo
from tkFileDialog import askopenfilename
class Person:
def __init__(self, file=None, baseDir=None):
import re
import codecs
import base64
import os
from Tkinter import *
from tkMessageBox import showinfo
from tkFileDialog import askopenfilename
class Person:
def __init__(self, file=None, baseDir=None):
@colek42
colek42 / kalman.py
Last active June 3, 2016 18:52
Kalman Filter
import math
import random
import matplotlib as mp
rndm = random.Random()
class KalmanFilter():
def __init__(self):
self.kalmanGain = 0
self.covariance = 1.0
{
// The plugin looks for a .jsbeautifyrc file in the same directory as the
// source file you're prettifying (or any directory above if it doesn't exist,
// or in your home folder if everything else fails) and uses those options
// along the default ones.
// Details: https://github.com/victorporof/Sublime-HTMLPrettify#using-your-own-jsbeautifyrc-options
// Documentation: https://github.com/einars/js-beautify/
"html": {
"allowed_file_extensions": ["htm", "html", "xhtml", "shtml", "xml", "svg"],
{
"editor.fontSize": 14,
"go.gopath": "/home/cole/go",
"go.vetOnSave": true,
"go.formatTool": "gofmt",
"go.useCodeSnippetsOnFunctionSuggest": true,
"go.formatOnSave": true,
"eslint.enable": true,
"eslint.enableAutofixOnSave": true,
@colek42
colek42 / gist:651127a7925b36f176192749338979c6
Created August 18, 2016 00:45
penumbra line, sunlight
https://github.com/AnalyticalGraphicsInc/cesium/issues/4123
var viewer = new Cesium.Viewer('cesiumContainer');
var penumbraSunlightPolyline = viewer.entities.add({
name: 'sunlight/penumbra polygon',
polyline: {
positions: Cesium.Cartesian3.fromDegreesArray([
0, 0,
1, 0
Ext.define('Videx.common.basewebplayer.videoslider.VideoSliderModel', {
extend: 'Ext.app.ViewModel',
alias: 'viewmodel.videoslider-videoslider',
data: {
sensorId: null,
startTime: null,
stopTime: null
},