Skip to content

Instantly share code, notes, and snippets.

View engincancan's full-sized avatar
🙂
I may be slow to respond.

Engin CAN engincancan

🙂
I may be slow to respond.
View GitHub Profile
@EddyVerbruggen
EddyVerbruggen / app.js
Last active June 20, 2016 06:20
NativeScript 3D Touch shortcut icons
// Open your app's main js file and add this handler (delimited by 'START 3DTouch wiring' and 'END 3DTouch wiring').
// Then tweak the handling of 'shortcutItem.type' to your liking (here I'm deeplinking 'compose' to the 'compose' page and ignore other shortcut types).
var application = require("application");
application.cssFile = "./app.css";
application.mainModule = "main-page";
// START 3DTouch wiring
var MyDelegate = (function (_super) {
@doismellburning
doismellburning / userstories.md
Last active October 30, 2017 16:25
Conference User Stories
@bennadel
bennadel / favor-exception-handler.htm
Created July 15, 2015 10:37
Quick Note: Favor $exceptionHandler() Over $log.error() In AngularJS
<!doctype html>
<html ng-app="Demo">
<head>
<meta charset="utf-8" />
<title>
Quick Note: Favor $exceptionHandler() Over $log.error() In AngularJS
</title>
</head>
<body ng-controller="AppController">
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 - Nathan Barraille
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@coolaj86
coolaj86 / github-pages-https-lets-encrypt.md
Last active November 16, 2021 22:36
Github Pages: Let's Encrypt!
@addyosmani
addyosmani / quickie.md
Last active April 24, 2022 22:20
Phonegap/Cordova + Polymer resources

Yoyo. There are more articles/resources available than the below, but most appear to be older. To avoid the pain of upgrading finding things broken, I would try one of these. They're more recent.

@DavidFrahm
DavidFrahm / 020_build_version.js
Last active December 28, 2020 00:05
Cordova build hook, to use build version from config.xml in your hybrid app
#!/usr/bin/env node
// This plugin replaces text in a file with the app version from config.xml.
var wwwFileToReplace = "js/build.js";
var fs = require('fs');
var path = require('path');
var rootdir = process.argv[2];
@kyleschmolze
kyleschmolze / back_button_manager.coffee
Created December 10, 2014 20:42
Easy back button service for Ionic on Android
# I wanted to be able to easily add back button callbacks to certain app states
# (using the word "state" here in the context of ui-router).
# For example, I always know that the back button on page X should quit the app, etc.
# So I wrote this nifty service.
angular.module("groupmuse").service "BackButtonManager", ($rootScope, $ionicPlatform) ->
managedStates = []
$rootScope.$on '$stateChangeSuccess', (event, next) ->
# Disable all listeners
@ssinss
ssinss / EndlessRecyclerOnScrollListener.java
Last active January 19, 2024 08:52
Endless RecyclerView OnScrollListener
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener {
public static String TAG = EndlessRecyclerOnScrollListener.class.getSimpleName();
private int previousTotal = 0; // The total number of items in the dataset after the last load
private boolean loading = true; // True if we are still waiting for the last set of data to load.
private int visibleThreshold = 5; // The minimum amount of items to have below your current scroll position before loading more.
int firstVisibleItem, visibleItemCount, totalItemCount;
@lylepratt
lylepratt / gist:d8bf84b3b7d6932e3549
Last active August 4, 2016 18:45
Grunt Task to Generate Manifest for cordova-app-loader
/* This generates a manifest file for use with the cordova-app-loader tool:
* https://github.com/markmarijnissen/cordova-app-loader
*/
/*
* You can add settings to your grunt initConfig
//jsonmanifest settings
jsonmanifest: {
generate: {