Skip to content

Instantly share code, notes, and snippets.

Tim Tregubov timofei7

Block or report user

Report or block timofei7

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@timofei7
timofei7 / .eslintrc
Created May 14, 2018
eslintrc for react-native projects
View .eslintrc
{
"extends": "airbnb",
"parser": "babel-eslint",
"env": {
"node": true,
"browser": true,
"es6": true
},
"rules": {
"strict": 0,
@timofei7
timofei7 / format_email.py
Created Mar 29, 2017 — forked from jason-feng/format_email.py
Formats emails nicely for slack
View format_email.py
## 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 <jason.s.feng.17@dartmouth.edu>
at_index = email.rfind("@")
name = email[0:at_index-3] # get just the jason.s.feng
@timofei7
timofei7 / README.md
Created Nov 15, 2016
README.md example
View README.md

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 Jun 8, 2016
cs52: eslintrc for react with es6 and airbnb
View .eslintrc
{
extends: "airbnb",
parser: "babel-eslint",
env: {
browser: true,
node: true,
es6: true
},
rules: {
strict: 0,
@timofei7
timofei7 / Singleton.cs
Created Mar 15, 2015
Generic Singleton MonoBehavior for Unity3D c#
View Singleton.cs
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 Mar 28, 2019
unity3d c# singleton class with automatic prefab loading
View Singleton.cs
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 Mar 15, 2015
monobehaviour extension that adds exception handling, aalue retrieval, and locking to Unity C# coroutines
View TTMonoBehaviour.cs
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
View geog54 tutorial.js
// 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;
View solarized_no_tabs
/*
Solarized theme for code-mirror
http://ethanschoonover.com/solarized
*/
/*
Solarized color pallet
http://ethanschoonover.com/solarized/img/solarized-palette.png
*/
View jsbin_settings.js
settings = {
jshint: true,
editor: {
theme: "lesser-dark",
indentUnit: 2,
smartIndent: true,
tabSize: 2,
indentWithTabs: false,
autoClearEmptyLines: true,
lineWrapping: false,
You can’t perform that action at this time.