Skip to content

Instantly share code, notes, and snippets.

View mreis1's full-sized avatar

Reis mreis1

View GitHub Profile
@mreis1
mreis1 / index.html
Created January 13, 2015 22:30
This is a template for angular experiments // source http://jsbin.com/feciqatari
<!doctype html>
<html ng-app="myApp">
<head>
<meta name="description" content="This is a template for angular experiments" />
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.min.js"></script>
</head>
<script src="http://angular-ui.github.io/ui-router/release/angular-ui-router.min.js"></script>
<body>
<div ng-controller="foo">
@mreis1
mreis1 / index.html
Created January 13, 2015 23:11
This exaplains how we can take advantage of factories to share data across controllers in angular.js source http://jsbin.com/feciqatari
<!doctype html>
<html ng-app="myApp">
<head>
<meta name="description" content="This is a template for angular experiments" />
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.min.js"></script>
</head>
<script src="http://angular-ui.github.io/ui-router/release/angular-ui-router.min.js"></script>
<body>
<ul>
@mreis1
mreis1 / index.html
Created January 14, 2015 01:03
Understanding how to isolate scopes using directives // source http://jsbin.com/sajifo
<!doctype html>
<html ng-app="myApp">
<head>
<meta name="description" content="Understanding how to isolate scopes using directives" />
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.min.js"></script>
<style id="jsbin-css">
body{
font-family:'Helvetica';
line-height: 1.5em;
@mreis1
mreis1 / index.html
Created January 14, 2015 01:25
Creating components: Directives that communicate // source http://jsbin.com/zikuvo
<!doctype html>
<html ng-app="myApp">
<head>
<meta name="description" content="Creating components: Directives that communicate" />
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.min.js"></script>
<style id="jsbin-css">
body{
font-family:'Helvetica';
@mreis1
mreis1 / README.txt
Created January 15, 2015 17:03
Apple: Create text file at current folder from finder window
http://apple.stackexchange.com/questions/129699/create-a-new-txt-file-in-finder-keyboard-shortcut
Open Automator, create a Service, set the input to "no input", Drag and Drop the "Execute AppleScript" Workflow Element onto the grey space, save the workflow;
Settings -> Keyboard -> Shortcuts -> Services, Assign a Shortcut
The Shortcut may not work, if it is assigned to an Apple-Intern Shortcut already. So be creative on choosing a new one.
Add this to the script:
try
tell application "Finder" to set the this_folder ¬
@mreis1
mreis1 / index.html
Created January 28, 2015 00:28
This is a template for angular experiments // source http://jsbin.com/jivoyu/3
<!doctype html>
<html ng-app="myApp">
<head>
<meta name="description" content="This is a template for angular experiments" />
<link href='http://fonts.googleapis.com/css?family=Signika+Negative:300,400,700' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Asap:400,700' rel='stylesheet' type='text/css'>
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js"></script>
<script src="http://s.cdpn.io/16327/sizzle.min.js "></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.min.js"></script>
@mreis1
mreis1 / viewport.js
Last active August 29, 2015 14:14
Javascript check user agent
// VIEWPORT SETTINGS
/*
if (navigator.userAgent.indexOf('iPhone') != -1) {
document.write('<meta name="viewport" content="width=480px, maximum-scale=1.0, user-scalable=0">');
}
if (navigator.userAgent.indexOf('iPad') != -1) {
document.write('<meta name="viewport" content="width=1024px, maximum-scale=1.0, user-scalable=0">');
}
if (navigator.userAgent.indexOf('Android') != -1) {
}*/
/**
Quick hack for kube-kube by mreis1
http://106.186.25.143/kuku-kube/en-3/
open the console:
1. copy the code below and paste on it;
2. press enter;
3. copy and paste this: solvePuzzle().trigger('click')
4. paste is as many times as you want to keep gaining points
*/
@mreis1
mreis1 / gist:3b903604acf76c26e3b0
Created June 26, 2015 21:15
console_errors.txt
/Users/MR/Downloads/angular-react-master.1/node_modules/typescript/bin/lib.d.ts(14357,5): error TS2300: Duplicate identifier 'clientX'.
/Users/MR/Downloads/angular-react-master.1/node_modules/typescript/bin/lib.d.ts(14358,5): error TS2300: Duplicate identifier 'clientY'.
/Users/MR/Downloads/angular-react-master.1/node_modules/typescript/bin/lib.d.ts(14359,5): error TS2300: Duplicate identifier 'identifier'.
/Users/MR/Downloads/angular-react-master.1/node_modules/typescript/bin/lib.d.ts(14360,5): error TS2300: Duplicate identifier 'pageX'.
/Users/MR/Downloads/angular-react-master.1/node_modules/typescript/bin/lib.d.ts(14361,5): error TS2300: Duplicate identifier 'pageY'.
/Users/MR/Downloads/angular-react-master.1/node_modules/typescript/bin/lib.d.ts(14362,5): error TS2300: Duplicate identifier 'screenX'.
/Users/MR/Downloads/angular-react-master.1/node_modules/typescript/bin/lib.d.ts(14363,5): error TS2300: Duplicate identifier 'screenY'.
/Users/MR/Downloads/angular-react-master.1/node_modules/typescript/bin/li
@mreis1
mreis1 / Log
Created June 26, 2015 22:46
Log.txt
MR$ ./node_modules/.bin/tsc -p src
/Users/MR/Downloads/angular-react-master.1/node_modules/typescript/bin/lib.d.ts(14357,5): error TS2300: Duplicate identifier 'clientX'.
/Users/MR/Downloads/angular-react-master.1/node_modules/typescript/bin/lib.d.ts(14358,5): error TS2300: Duplicate identifier 'clientY'.
/Users/MR/Downloads/angular-react-master.1/node_modules/typescript/bin/lib.d.ts(14359,5): error TS2300: Duplicate identifier 'identifier'.
/Users/MR/Downloads/angular-react-master.1/node_modules/typescript/bin/lib.d.ts(14360,5): error TS2300: Duplicate identifier 'pageX'.
/Users/MR/Downloads/angular-react-master.1/node_modules/typescript/bin/lib.d.ts(14361,5): error TS2300: Duplicate identifier 'pageY'.
/Users/MR/Downloads/angular-react-master.1/node_modules/typescript/bin/lib.d.ts(14362,5): error TS2300: Duplicate identifier 'screenX'.
/Users/MR/Downloads/angular-react-master.1/node_modules/typescript/bin/lib.d.ts(14363,5): error TS2300: Duplicate identifier 'screenY'.
/Users/MR/Downloads/angular-react-mast