Skip to content

Instantly share code, notes, and snippets.

View nerdfiles's full-sized avatar
⚕️
bringing about the end-times of the philosophy

aha hah nerdfiles

⚕️
bringing about the end-times of the philosophy
View GitHub Profile

AngularJS ngdocs examples

Module

/**
  * @ngdoc overview
  * @name Dashboard
  * @description Main module of the application
  */
angular.module('Dashboard', []);
@nerdfiles
nerdfiles / vimrc
Created May 2, 2017 06:09 — forked from code4rain/vimrc
My vim configuration
set nocompatible " be iMproved
set rtp+=~/.fzf
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" For Vundle
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
@nerdfiles
nerdfiles / BlockPropagation.md
Created February 6, 2017 06:44 — forked from gavinandresen/BlockPropagation.md
O(1) block propagation

O(1) Block Propagation

The problem

Bitcoin miners want their newly-found blocks to propagate across the network as quickly as possible, because every millisecond of delay increases the chances that another block, found at about the same time, wins the "block race."

@nerdfiles
nerdfiles / namespaces.tsv
Created January 22, 2017 23:14 — forked from miku/namespaces.tsv
Namespace prefix according to prefix.cc
aair http://xmlns.notu.be/aair#
aapi http://rdf.alchemyapi.com/rdf/v1/s/aapi-schema#
aat http://vocab.getty.edu/aat/
abc http://www.metadata.net/harmony/ABCSchemaV5Commented.rdf#
ac http://umbel.org/umbel/ac/
acc http://purl.org/NET/acc#
acco http://purl.org/acco/ns#
acl http://www.w3.org/ns/auth/acl#
acm http://www.rkbexplorer.com/ontologies/acm#
act http://www.w3.org/2007/rif-builtin-action#
@nerdfiles
nerdfiles / Microservices.md
Last active March 21, 2017 16:58 — forked from Integralist/Microservices.md
Microservices

In Summary:

  • Microservices are small autonomous services
  • Microservices are modeled around business concepts
  • Microservices encourage a culture of automation
  • Microservices should be highly observable
  • Microservices should hide implementation details
  • Microservices should isolate failure
  • Microservices should be deployed independently
  • Microservices should decentralise all the things
define(['services/module', 'underscore'], function (module, _) {
'use strict';
function OrderResource($http, $q, link) {
// ... other functions removed: viewState, accessState, flattenResource
// viewState is a deeper resource
// accessState looks at the Accept headers
// flattenResource: flattens all of this for the client-side resource (in-memory model bound to view)
// PhantomJS Cheatsheet
$ brew update && brew install phantomjs // install PhantomJS with brew
phantom.exit();
var page = require('webpage').create();
page.open('http://example.com', function() {});
page.evaluate(function() { return document.title; });
@nerdfiles
nerdfiles / optimizely-js-api-cheatsheet.js
Created January 20, 2017 16:42 — forked from LeCoupa/optimizely-js-api-cheatsheet.js
Optimizely Javascript API Cheatsheet
// Optimizely JavaScript API
// http://developers.optimizely.com/javascript/
// To opt a visitor out of Optimizely tracking
// http://www.example.com/page.html?optimizely_opt_out=true
// 1. API Function Calls
// http://developers.optimizely.com/javascript/#api-function-calls-2
@nerdfiles
nerdfiles / mixpanel-cheatsheet.js
Created January 20, 2017 16:31 — forked from LeCoupa/mixpanel-cheatsheet.js
Mixpanel Library CheatSheet
// Mixpanel Cheatsheet
// This requires the mixpanel javascript library to be embedded on your site
// https://mixpanel.com/help/reference/javascript-full-api-reference
// 1. API Methods.
mixpanel.init('new token', { your: 'config' }, 'library_name'); // initialize a new instance of the Mixpanel tracking object
mixpanel.push(['register', { a: 'b' }]); // push() keeps the standard async-array-push behavior around after the lib is loaded. This is only useful for external integrations that do not wish to rely on our convenience methods (created in the snippet).
@nerdfiles
nerdfiles / bash-cheatsheet.sh
Created January 20, 2017 16:30 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04