Skip to content

Instantly share code, notes, and snippets.

View jQrgen's full-sized avatar
🍻
Kjempemessig

Jørgen Svennevik Notland jQrgen

🍻
Kjempemessig
  • Bitcoin Unlimited
  • Trondheim, Norway
  • X @jQrgensn
View GitHub Profile
@jdnichollsc
jdnichollsc / app.js
Last active May 8, 2017 18:31
Ionic Google OAuth Authentication, Firebase 3 and (ngCordovaOauth plugin or cordova-plugin-googleplus)
angular.module('App', ['ionic', 'ngCordova', 'ngAnimate', 'ngCordovaOauth', 'firebase'])
.run(['$ionicPlatform',
'$rootScope',
'$firebaseAuth',
function($ionicPlatform, $rootScope, $firebaseAuth) {
$ionicPlatform.ready(function() {
if(window.cordova && window.cordova.plugins.Keyboard) {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
@bahmutov
bahmutov / server-after.js
Last active August 7, 2017 17:34
Remove boilerplate when connecting promise-returning middleware to Express
// use point-free callbacks
// http://glebbahmutov.com/blog/point-free-programming-is-not-pointless/
var middleware = require('./middleware');
app.get('example/uri', function (req, res, next) {
middleware.first(req, res)
.then(next)
.catch(res.json)
.done();
}, function (req, res, next) {
middleware.second(req, res)
@CrabDude
CrabDude / callback_contract.md
Last active December 20, 2019 18:50
Node.js Callback Contract

Node.js Callback* Contract

(aka "errback" or "error first callback")

  1. Function that takes 2 arguments
    • first argument is an error
    • second argument is the result
    • Never pass both
    • error should be instanceof Error
  2. Must never excecute on the same tick of the event loop
  3. Must be passed as last argument to function
#!/usr/bin/env bash
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz
mkdir vim && tar xzvf vim.tar.gz -C vim
export PATH=$PATH:/app/vim/bin
@JamesDullaghan
JamesDullaghan / Bulletproof_foods.md
Created June 15, 2013 22:41
Dave Aspreys bulletproof diet food list

How many servings should I eat per day?

  • Fruit = 1-2 servings
  • Animal protein = 4 - 6 servings
  • Healthy fats = 5 - 9 servings
  • Healthy vegetables = 6 - 11 servings

How should I allocate my calories per day?

  • Healthy fats = 50%
@poacher2k
poacher2k / Superkontraktmal.md
Last active April 9, 2021 11:04 — forked from malarkey/Contract Killer 3.md
En åpen kildekode-kontrakt for web-designere og -utviklere av Fjellstad & Skogly Web

Superkontraktmal

En åpen kildekode-kontrakt for web-designere og -utviklere av [Fjellstad & Skogly] (http://www.fjellstadskogly.no/) basert på ["Contract Killer"] (http://stuffandnonsense.co.uk/projects/contract-killer/) av [Stuff & Nonsense] (http://stuffandnonsense.co.uk/) og [eksempler på oppdragsavtaler] (http://www.frilansinfo.no/nedlasting) av [Frilansinfo] (http://www.frilansinfo.no/).

  • Originalt utgitt: 12.02.2014
  • Revidert dato: 16.06.2015

Logo

NAVN - E-POST - TELEFON - NETTSIDE - ADRESSE - ORG.NR. - osv.

@dinorahtovar
dinorahtovar / bitbucket-pipelines.yml
Created January 12, 2019 00:29
Bitbucket Pipeline Android
image: java:8
pipelines:
branches:
deployment:
- step:
caches:
- gradle
- android-sdk
@bborysenko
bborysenko / .gitlab-ci.yml
Created June 20, 2018 20:59 — forked from danielgomezrico/.gitlab-ci.yml
Android / Gitlab ci - sample setup files to setup your own local gitlab runner with real physical android devices. Check https://github.com/caipivara/awesome-android-scripts
stages:
- build
- test
- deploy
variables:
GIT_STRATEGY: clone
cache:
key: ${CI_PROJECT_ID}
@wilsonwc
wilsonwc / stateMock.js
Created January 10, 2014 17:24
Angular Mock for properly resolving ui-router $state in Karma unit tests
angular.module('stateMock',[]);
angular.module('stateMock').service("$state", function($q){
this.expectedTransitions = [];
this.transitionTo = function(stateName){
if(this.expectedTransitions.length > 0){
var expectedState = this.expectedTransitions.shift();
if(expectedState !== stateName){
throw Error("Expected transition to state: " + expectedState + " but transitioned to " + stateName );
}
}else{
@mlynch
mlynch / cordova-plugin-guide.md
Last active February 3, 2023 00:21
Cordova Plugin Developer Guide

Cordova Plugin Development Guide (iOS and Android)

Version: 0.0.1 updated 7/1/2016

Cordova Plugins are the magic that enable our mobile web app content to access the full power of Native SDKs underneath, but through clean JavaScript APIs that work the same across all platforms we target.

Building Cordova plugins is scary for many Cordova and Ionic developers, but it doesn't have to be. This simple guide walks through the what, when, why, and how of Cordova plugin development for iOS and Android.

Introduction