Skip to content

Instantly share code, notes, and snippets.

@nucleartide
nucleartide / tags.txt
Created April 24, 2014 00:19
Complete list of tags from StackOverflow Careers
(u'javascript', 598)
(u'java', 524)
(u'c#', 312)
(u'python', 282)
(u'css', 245)
(u'jquery', 237)
(u'c++', 232)
(u'php', 231)
(u'sql', 228)
(u'html5', 213)
@nucleartide
nucleartide / DragPiece2D.cs
Created November 25, 2013 08:23
A C# script for Unity that allows you to drag 2D rigidbodies around. Works with Unity 4.3's Box2D wrappers.
using UnityEngine;
using System.Collections;
public class DragPiece2D : MonoBehaviour {
public float dampingRatio = 5.0f;
public float frequency = 2.5f;
public float drag = 10.0f;
public float angularDrag = 5.0f;
private SpringJoint2D springJoint;
@nucleartide
nucleartide / max_consecutive_sum.cpp
Created October 10, 2013 22:38
Solution to maximum consecutive sum problem
#include <vector>
#include <iostream>
int max_consecutive_sum(const std::vector<int> &arr) {
if (arr.size() == 0) {
return 0;
}
std::vector<int> sums(arr.size(), 0);