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
@danharper
danharper / background.js
Last active April 29, 2025 04:09
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
@esfand
esfand / typescript_angular.adoc
Last active September 30, 2022 12:37
AngularJS with TypeScript
@fhemberger
fhemberger / talks.md
Last active August 29, 2015 14:05
FrOSCon 2014 Cologne.js JavaScript track
@giacomopaita
giacomopaita / SASS Mixins
Last active August 29, 2015 14:07
MIxins Collection
// @include font-face($style-name, $file, $family, $category);
// $style-name being the name of the font e.g. Helvetica
// $file meaning the file name, without the file extensions
// $family being the folder inside the fonts folder where the font files are
// $category is serif or sans-serif or monospace etc. as a fall back in CSS
// Here with real values:
//
// @include font-face('Ashbury', 'AshburyLig-webfont', 'Ashbury', 'serif');
// use with iconmoon: https://icomoon.io/app/#/select/font
@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: {
@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;
@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
@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];
@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.

@coolaj86
coolaj86 / github-pages-https-lets-encrypt.md
Last active November 16, 2021 22:36
Github Pages: Let's Encrypt!