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
[
{
"PKCityId": 1,
"Name": "ADANA"
},
{
"PKCityId": 2,
"Name": "ADIYAMAN"
},
{
@engincancan
engincancan / gist:066fe4eae35cc45d8682
Created November 12, 2015 09:04
Must Read Must Watch Must Look
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
@engincancan
engincancan / gulpfile.js
Created November 20, 2015 09:43 — forked from rev087/gulpfile.js
Gulp task to bump semver
// 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');
@engincancan
engincancan / build
Created November 23, 2015 10:15 — forked from RhinoLance/build
Modified cordova ios build for deployment
#!/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
@engincancan
engincancan / grunt.js
Created November 30, 2015 08:15 — forked from paulmillr/grunt.js
Gulp / grunt
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');
@engincancan
engincancan / botdm.cfg
Created December 18, 2015 10:09 — forked from caleywoods/botdm.cfg
Bot DM config for CS:Global Offensive
// 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
@engincancan
engincancan / Gruntfile.js
Created January 22, 2016 09:18 — forked from RhinoLance/Gruntfile.js
Gruntfile for automated Cordova builds.
/*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" : "" %>' +
@engincancan
engincancan / build.gradle
Created February 29, 2016 09:22 — forked from mychaelstyle/build.gradle
Example Gradle build Java with FindBugs and PMD and CPD
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
# Cordova Magic Commands
conjure() {
cordova create $1 $2 $3
cd $1
}
alias conjure=conjure
summon() {
cordova platform add $1
}
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;