Skip to content

Instantly share code, notes, and snippets.

View ergunkocak's full-sized avatar

Ergün KOÇAK ergunkocak

  • Cologne, Germany
View GitHub Profile
import android.app.Activity;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
@roderik
roderik / app_name.rb
Created November 26, 2015 10:16
Fastlane actions mentioned in the Kunstmaan Labs blogpost "iOS continuous delivery with Jenkins and Fastlane" found at https://labs.kunstmaan.be/blog/ios-continuous-delivery-with-jenkins-and-fastlane
module Fastlane
module Actions
class AppNameAction < Action
def self.run(params)
require 'plist'
identifier_key = 'CFBundleDisplayName'
folder = Dir['*.xcodeproj'].first
info_plist_path = params[:plist_path]
raise "Couldn't find info plist file at path '#{params[:plist_path]}'".red unless File.exist?(info_plist_path)
plist = Plist.parse_xml(info_plist_path)
@orta
orta / _SQL.sql
Last active November 8, 2016 12:12
Top 300 Pods by Application Integrations
SELECT pods.name, stats_metrics.download_total, stats_metrics.download_week, stats_metrics.app_total, stats_metrics.app_week FROM stats_metrics JOIN pods ON stats_metrics.pod_id = pods.id ORDER BY app_total DESC LIMIT 300;
@voduytuan
voduytuan / build.xml
Created September 19, 2015 05:18
Sample build.xml for apache Ant for php project
<?xml version="1.0" encoding="UTF-8"?>
<project name="Apitoy" default="full-build">
<!-- By default, we assume all tools to be on the $PATH -->
<property name="pdepend" value="/home/jenkins/vendor/bin/pdepend"/>
<property name="phpcpd" value="/home/jenkins/vendor/bin/phpcpd"/>
<property name="phpcs" value="/home/jenkins/vendor/bin/phpcs"/>
<property name="phploc" value="/home/jenkins/vendor/bin/phploc"/>
<property name="phpmd" value="/home/jenkins/vendor/bin/phpmd"/>
<property name="phpunit" value="/home/jenkins/vendor/bin/phpunit"/>
@mat
mat / Readme.markdown
Last active December 20, 2024 10:56
apple-app-site-association —with examples

“apple-app-site-association” file

One file for each domain, both www.example.com and example.com need separate files:

{
    "applinks": {
        "apps": [],
        "details": {
 "9JA89QQLNQ.com.apple.wwdc": {
@jonathan-beebe
jonathan-beebe / clean_old_code_simulators.sh
Last active February 12, 2019 19:40
Clean out unused Xcode Simulators
# Close Xcode & the iOS Simulator
# http://stackoverflow.com/a/30940055
# Remove any old runtimes from this directory.
cd /Library/Developer/CoreSimulator/Profiles/Runtimes
# e.g.
sudo rm -rf iOS\ 8.1.simruntime
# http://stackoverflow.com/a/11790983
# Remove the download receipts for simulators you don't need anymore.
@Tokuriku
Tokuriku / Count lines of code in Xcode project
Last active June 30, 2024 21:09 — forked from ccabanero/Count lines of code in Xcode project
Count lines of code in SWIFT Xcode project
1. Open Terminal
2. cd to your Xcode project
3. Execute the following when inside your target project:
find . -name "*.swift" -print0 | xargs -0 wc -l
@imran0101
imran0101 / EndlessRecyclerOnScrollListener.java
Last active February 22, 2022 12:50
RecyclerView position helper to get first and last visible positions
/**
* Custom Scroll listener for RecyclerView.
* Based on implementation https://gist.github.com/ssinss/e06f12ef66c51252563e
*/
public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener {
public static String TAG = "EndlessScrollListener";
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.
@Ashton-W
Ashton-W / Breakpoints_v2.xcbkptlist
Last active January 25, 2023 09:28
My User Breakpoints_v2.xcbkptlist
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "2"
version = "2.0">
<Breakpoints>
<!-- All Exceptions -->
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
<BreakpointContent
@paulochf
paulochf / countries.sql
Last active April 26, 2024 09:50 — forked from adhipg/countries.sql
Outdated. Used with discretion. Accepting updates.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;