Skip to content

Instantly share code, notes, and snippets.

View timofei7's full-sized avatar

Tim Tregubov timofei7

View GitHub Profile
{
"basics": {
"name": "Tim Tregubov",
"label": "Director, Co-founder at DALI Lab; Senior Lecturer in Computer Science",
"picture": "",
"email": "[email protected]",
"phone": "603.219.6514",
"website": "http://zingweb.com",
"summary": "Educating and Innovating through Code and Design",
"location": {
@timofei7
timofei7 / .eslintrc
Created May 14, 2018 00:13
eslintrc for react-native projects
{
"extends": "airbnb",
"parser": "babel-eslint",
"env": {
"node": true,
"browser": true,
"es6": true
},
"rules": {
"strict": 0,
@timofei7
timofei7 / format_email.py
Created March 29, 2017 01:27 — forked from jason-feng/format_email.py
Formats emails nicely for slack
## Turns list of dartmouth emails into formatted emails with first and last name
f = open("names.txt")
o = open("names_edit.txt", 'w')
for email in f.readlines():
email = email.strip()
email = email[:-1] # Remove semicolon
bracket_email = "<" + email + ">" # Now its like <[email protected]>
at_index = email.rfind("@")
name = email[0:at_index-3] # get just the jason.s.feng
@timofei7
timofei7 / README.md
Created November 15, 2016 04:47
README.md example

Project Name

TODO:

  • short project description
  • some sample screenshots or mockups

Architecture

TODO: descriptions of code organization and tools and libraries used

@timofei7
timofei7 / .eslintrc
Created June 8, 2016 04:05
cs52: eslintrc for react with es6 and airbnb
{
extends: "airbnb",
parser: "babel-eslint",
env: {
browser: true,
node: true,
es6: true
},
rules: {
strict: 0,
@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 / Singleton.cs
Last active October 1, 2022 10:06
unity3d c# singleton class with automatic prefab loading
using UnityEngine;
using System.Collections;
using System;
/// <summary>
/// Prefab attribute. Use this on child classes
/// to define if they have a prefab associated or not
/// By default will attempt to load a prefab
/// that has the same name as the class,
/// otherwise [Prefab("path/to/prefab")]
@timofei7
timofei7 / TTMonoBehaviour.cs
Created March 15, 2015 20:08
monobehaviour extension that adds exception handling, aalue retrieval, and locking to Unity C# coroutines
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Extending MonoBehaviour to add some extra functionality
/// Exception handling from: http://twistedoakstudios.com/blog/Post83_coroutines-more-than-you-want-to-know
///
/// 2013 Tim Tregubov
// 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;
/*
Solarized theme for code-mirror
http://ethanschoonover.com/solarized
*/
/*
Solarized color pallet
http://ethanschoonover.com/solarized/img/solarized-palette.png
*/