Skip to content

Instantly share code, notes, and snippets.

@victormejia
victormejia / Preferences.sublime-settings
Created May 30, 2014 18:27
My Sublime user settings
{
"afn_use_keybinding": true,
"caret_style": "wide",
"color_scheme": "Packages/User/Flatland Dark (SL).tmTheme",
"draw_minimap_border": true,
"fade_fold_buttons": false,
"font_face": "Consolas",
"font_size": 9,
"ignored_packages":
[
function sendFile = function (el) {
scope.uploading = true;
var filename = $('#inputElement').val(),
fObj = el.files[0];
if (f == '') {
return false;
}
var fPart = filename.split('\\'),
origFilename = fPart[fPart.length - 1];
public static string PostRequest(Uri serviceReqUrl, string jsonData, Dictionary<string, string> additionalHeaders, out System.Net.HttpStatusCode statusCode)
{
HttpResponseMessage response = null;
try
{
using (HttpClient client = new HttpClient())
{
HttpContent content = new System.Net.Http.StringContent(jsonData, System.Text.Encoding.UTF8, "application/json");
if (additionalHeaders != null)
{

Set up (assuming you have Node and NPM installed)

npm install -g karma
npm install -g karma-cli

If you get any MS build errors, set the msvs version, and run again:

npm config set msvs_version 2013 --global

Setting up new project

describe('Portfolio Module', function () {
var DesignerContextSvc, $httpBackend, authRequestHandler, path, adTypeId = 1;
var metadata = {
collection: [{
name: "leaderboard",
label: "Leaderboard",
units: [{
name: "desktop",
.highlight { background: #ffffff; }
.highlight .c { color: #999988; font-style: italic } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { font-weight: bold } /* Keyword */
.highlight .o { font-weight: bold } /* Operator */
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
@victormejia
victormejia / gist:9563967d63f8a8b4c371
Last active August 29, 2015 14:19
victor_wish_list.md
  • D3
  • MomentJS for date manipulation
  • lodash very useful functional helpers or Underscore is good also
  • GitHub Fetch API polyfill cool library for http, although angular's $http should be fine
  • Chart.js charting library, easy to use api, however it's canvas, not SVG
.directive('scrollPosition', ['$window', function($window) {
return {
scope: {
target: '=scrollPosition'
},
link: function (scope, element) {
// Detect request animation frame
var scroll = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
d3.select("#selections")
.append("p")
.text("New paragraph!");
// var data = [
// {
// "browser":"Chrome",
// "value": "45"
// },
// {
// "browser":"Safari",
// "value":"12"
// },