Skip to content

Instantly share code, notes, and snippets.

View timofei7's full-sized avatar

Tim Tregubov timofei7

View GitHub Profile
/*
Solarized theme for code-mirror
http://ethanschoonover.com/solarized
*/
/*
Solarized color pallet
http://ethanschoonover.com/solarized/img/solarized-palette.png
*/
// the geoserver workspace:layer
var layername = 'opengeo:normalized';
// chose a column variable you'd like to show
var viewparams = 'column:pct_park_access';
var mapTitle = 'US Park Access 2010';
// this is the url for a geoserver instance set up
// exactly the way as in the geoserver lab
var geojsonURL = 'http://geo.dali.dartmouth.edu/wfs?service=WFS&version=2.0.0&request=GetFeature&typeNames='+layername+'&srsName=EPSG:4326&outputFormat=application/json&viewparams='+viewparams;
@timofei7
timofei7 / Singleton.cs
Created March 15, 2015 22:06
Generic Singleton MonoBehavior for Unity3D c#
using UnityEngine;
using System.Collections;
/// <summary>
/// MONOBEHAVIOR PSEUDO SINGLETON ABSTRACT CLASS
/// usage : best is to be attached to a gameobject but if not that is ok,
/// : this will create one on first access
/// example : '''public sealed class MyClass : Singleton<MyClass> {'''
/// references : http://tinyurl.com/d498g8c
/// : http://tinyurl.com/cc73a9h
@timofei7
timofei7 / synfig-libmod_png
Created November 29, 2011 05:22
synfig problem compiling -- libmod_png_la-trgt_png.lo errors
==> Downloading https://downloads.sourceforge.net/project/synfig/synfig/0.63.02/synfig-0.63.02.tar.gz
File already downloaded in /Users/tim/Library/Caches/Homebrew
/usr/bin/tar xf /Users/tim/Library/Caches/Homebrew/synfig-0.63.02.tar.gz
==> ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/synfig/0.63.02
./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/synfig/0.63.02
checking build system type... x86_64-apple-darwin11.2.0
checking host system type... x86_64-apple-darwin11.2.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
@timofei7
timofei7 / dartmouth_grading.txt
Created December 1, 2011 06:03
dartmouth grading
Abbreviated from:
http://www.dartmouth.edu/~reg/regulations/undergrad/degree-req.html
(Scholarship Ratings Section)
Credits: all courses are in the form of course units. Each
course count unit may be considered the equivalent of a semester
course worth 3.3 semester hours (4.5 if a laboratory course) or 5
quarter hours (6.7 if a laboratory course.)
@timofei7
timofei7 / gist:1439682
Created December 6, 2011 19:56
synfigstudio crashes os x 10.7.2 (homebrew compiled) synfig/synfigstudio version 0.63.03 (happened in 0.63.02 as well)
synfig studio -- starting up application...
synfig(11938) [15:25:05] info: Created directory "/Users/tim/Library/Synfig"
synfig(11938) [15:25:05] info: Loading modules from /usr/local/Cellar/synfig/0.63.03/etc/synfig_modules.cfg
synfig(11938) [15:25:05] info: Created directory "/Users/tim/Library/Synfig/tmp"
(synfigstudio:11938): GLib-GObject-CRITICAL **: Object class gtkmm__CustomObject_N6studio15ValueBase_EntryE doesn't implement property 'editing-canceled' from interface 'GtkCellEditable'
synfigstudio(11938,0x7fff748e0960) malloc: *** error for object 0x101c85168: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6
@timofei7
timofei7 / gist:1439945
Created December 6, 2011 20:51
stacktrace for synfigstudio crashes os x 10.7.2 (homebrew compiled) synfig/synfigstudio version 0.63.03 (happened in 0.63.02 as well)
Starting program: /usr/local/bin/synfigstudio
Reading symbols for shared libraries ++++++++++++++++++++++++++++++...............................warning: Could not find object file "/private/tmp/homebrew-libffi-3.0.9-iZ0U/libffi-3.0.9/src/.libs/debug.o" - no debug information available for "debug.c".
warning: Could not find object file "/private/tmp/homebrew-libffi-3.0.9-iZ0U/libffi-3.0.9/src/.libs/prep_cif.o" - no debug information available for "prep_cif.c".
warning: Could not find object file "/private/tmp/homebrew-libffi-3.0.9-iZ0U/libffi-3.0.9/src/.libs/types.o" - no debug information available for "types.c".
warning: Could not find object file "/private/tmp/homebrew-libffi-3.0.9-iZ0U/libffi-3.0.9/src/.libs/raw_api.o" - no debug information available for "raw_api.c".
warning: Could not find object file "/private/tmp/homebrew-libffi-3.0.9-iZ0U/libffi-3.0.9/src/.libs/java_raw_api.o" - no debug information available for "java_raw_api.c".
@timofei7
timofei7 / index.html
Last active December 13, 2015 17:28 — forked from darwin/index.html
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/>
<script src="http://cmx.io/v/0.1/cmx.js"></script>
<body>
<scene id="scene1">
<label t="translate(0,346)">
<tspan x="0" y="0em">Valentine's Day 2013</tspan>
</label>
<actor t="translate(18,56)" pose="-11,9|-5,117|-11,99|-11,89|-11,79|-11,59|-13,31|-20,14|1,34|6,9|-18,79|-18,59|-6,79|-1,59">
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/>
<script src="http://cmx.io/v/0.1/cmx.js"></script>
<body>
<scene id="scene1">
<label t="translate(0,346)">
<tspan x="0" y="0em">the raptortiger encounter</tspan>
</label>
<actor t="translate(18,56)" pose="-11,9|-5,117|-11,99|-11,89|-11,79|-11,59|-13,31|-20,14|1,34|6,9|-18,79|-18,59|-6,79|-1,59">
# Housekeeping: clear workspace and load packages
rm(list=ls(all=TRUE))
library(lubridate)
library(RgoogleMaps)
library(ggmap)
library(mapproj)
library(ggplot2)
library(plyr)
# Load 2011 GDELT data from http://eventdata.psu.edu/data.dir/GDELT.html