Skip to content

Instantly share code, notes, and snippets.

@javierarques
javierarques / protractorAPICheatsheet.md
Last active July 10, 2024 11:24
Protractor API Cheatsheet
(function(){
'use strict';
angular
.module('app', [])
.directive('ngInsert', ngInsert)
.directive('ngInsert', ngInsertFillContentDirective);
ngInsert = ['$templateRequest', '$anchorScroll', '$animate', '$sce'];
function ngInsert($templateRequest, $anchorScroll, $animate, $sce) {
@jimthedev
jimthedev / Gruntfile.js
Created July 10, 2014 16:21
How to implement customized SCSS/SASS after creating a project with ionic generator
//
// PATH TO THIS FILE: root of your project
//
// Edit your Gruntfile.js file's bower install section to exclude ionic's css
// as shown below. This is just a snippet so you need to find this section.
// If you don't do this, then you'll get ionic in CSS precompiled form
// in addition to your custom scss build and everything will break.
// Automatically inject Bower components into the app
'bower-install': {
@lucasjones
lucasjones / app.js
Last active January 29, 2017 05:49
Simple node.js static and dynamic file express server
/***********************************
*Simple node.js static and dynamic file express server
*Author: Lucas Jones
***********************************/
//Load node.js modules
var express = require('express'); //Require the Express Module
//Runs every time a request is recieved
function logger(req, res, next) {
@m3nd3s
m3nd3s / NERDTree.mkd
Last active November 23, 2023 13:45
My Vim Cheat Sheet

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|

O.......Recursively open the selected directory..................|NERDTree-O|

@Mithrandir0x
Mithrandir0x / gist:3639232
Created September 5, 2012 16:15
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"