This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Cordova Magic Commands | |
conjure() { | |
cordova create $1 $2 $3 | |
cd $1 | |
} | |
alias conjure=conjure | |
summon() { | |
cordova platform add $1 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: "java" | |
apply plugin: "eclipse" | |
apply plugin: "maven" | |
apply plugin: "findbugs" | |
apply plugin: "pmd" | |
def defaultEncoding = 'UTF-8' | |
[compileJava, compileTestJava]*.options*.encoding = defaultEncoding | |
sourceCompatibility = 1.7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global module:false*/ | |
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
meta: { | |
banner: '/*! <%= pkg.name || pkg.name %> - v<%= pkg.version %> - ' + | |
'<%= grunt.template.today("yyyy-mm-dd") %>\n' + | |
'<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bot DM script | |
sv_cheats 1 | |
// Remove, set 0 or put in // if you don't want replenished ammo or set 2 if you'd rather reload your weapon | |
//sv_infinite_ammo 0 | |
mp_round_restart_delay 0 | |
mp_freezetime 0 | |
mp_spawnprotectiontime 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function ( grunt ) { | |
/** | |
* Load required Grunt tasks. These are installed based on the versions listed | |
* in `package.json` when you do `npm install` in this directory. | |
*/ | |
grunt.loadNpmTasks('grunt-contrib-clean'); | |
grunt.loadNpmTasks('grunt-contrib-copy'); | |
grunt.loadNpmTasks('grunt-contrib-jshint'); | |
grunt.loadNpmTasks('grunt-contrib-concat'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you under the Apache License, Version 2.0 (the | |
# "License"); you may not use this file except in compliance | |
# with the License. You may obtain a copy of the License at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This gulpfile adds three tasks to bump the semver release: bump:major, bump:minor, bump:patch. | |
// First, it checks if the git repository is clean, and fails with an alert otherwise, then: | |
// - Update manifests (in this example, package.json and Info.plist) | |
// - Add manifests to the git stage | |
// - Commit changes in the manifests with the message "Prepare for vX.Y.Z" | |
// - Tag the release | |
// All that is left for the user to do is push the commit/tag to the remote repo with `git push --tags` | |
var gulp = require('gulp'); | |
var semver = require('semver'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Must Read; | |
https://github.com/johnpapa/angular-styleguide | |
https://github.com/angular/angular.js/wiki/Understanding-Scopes | |
Must Watch; | |
https://www.youtube.com/watch?v=PMfcsYzj-9M | |
Must Look; | |
https://github.com/addyosmani/critical |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"PKCityId": 1, | |
"Name": "ADANA" | |
}, | |
{ | |
"PKCityId": 2, | |
"Name": "ADIYAMAN" | |
}, | |
{ |