Skip to content

Instantly share code, notes, and snippets.

View hrskrs's full-sized avatar

Haris Krasniqi hrskrs

View GitHub Profile
@hrskrs
hrskrs / run-sonar.sh
Created November 11, 2015 12:09
SonarQube analysis runner shell script
#!/bin/bash
## INSTALLATION: script to copy in your Xcode project in the same directory as the .xcodeproj file
## USAGE: ./run-sonar.sh
## DEBUG: ./run-sonar.sh -v
## WARNING: edit your project parameters in sonar-project.properties rather than modifying this script
#
trap "echo 'Script interrupted by Ctrl+C'; stopProgress; exit 1" SIGHUP SIGINT SIGTERM
function startProgress() {
@hrskrs
hrskrs / curl.md
Created August 21, 2018 13:02 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@hrskrs
hrskrs / SubscriptionUtil.class
Last active June 19, 2018 16:21
Util class for implementing In App Subscription
import android.app.Activity;
import android.content.Context;
import android.util.Log;
import com.tcm.android.utils.purchaseUtils.IabHelper;
import com.tcm.android.utils.purchaseUtils.IabResult;
import com.tcm.android.utils.purchaseUtils.Inventory;
import com.tcm.android.utils.purchaseUtils.Purchase;
import com.tcm.android.utils.purchaseUtils.SkuDetails;
@hrskrs
hrskrs / pr.md
Created November 3, 2017 13:09 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@hrskrs
hrskrs / .travis.yml
Created May 11, 2017 10:00
TravisCI Android Configuration
language: android
jdk:
- oraclejdk8
android:
components:
# Use the latest revision of Android SDK Tools
- platform-tools
- tools