Skip to content

Instantly share code, notes, and snippets.

Avatar

Haris Krasniqi hrskrs

View GitHub Profile
@hrskrs
hrskrs / curl.md
Created Aug 21, 2018 — forked from subfuzion/curl.md
curl POST examples
View curl.md

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 / pr.md
Created Nov 3, 2017 — forked from piscisaureus/pr.md
Checkout github pull requests locally
View pr.md

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
TravisCI Android Configuration
View .travis.yml
language: android
jdk:
- oraclejdk8
android:
components:
# Use the latest revision of Android SDK Tools
- platform-tools
- tools
@hrskrs
hrskrs / SubscriptionUtil.class
Last active Jun 19, 2018
Util class for implementing In App Subscription
View SubscriptionUtil.class
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 / run-sonar.sh
Created Nov 11, 2015
SonarQube analysis runner shell script
View run-sonar.sh
#!/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() {