Skip to content

Instantly share code, notes, and snippets.

zmarkan / config.yml
Last active Mar 19, 2021 — forked from hacktivist123/config.yml
Cloud Foundry CircleCI
View config.yml
version: '2.1'
- image: cimg/base:stable
- checkout
- run:
name: Install Cloud Foundry CLI
zmarkan /
Last active Dec 3, 2020
Commit to branch, push, and trigger a new CI build. Useful when debugging CI/CD configurations.
# Add this to your BASH or ZSH profile.
# Execute with ciffs
alias ciffs='branchname=`git rev-parse --abbrev-ref HEAD` && git commit -am "CI FFS" && git push origin $branchname'
zmarkan / Bookmarklet - Compare GitHub commit with master
Last active May 29, 2020
Bookmarklet: Compare GitHub commit with Master
View Bookmarklet - Compare GitHub commit with master


  1. Create a new bookmark in your bookmarks bar with the following contents:
javascript: (function(){
            let location = window.location.href;
            let validatorRegex = /https:\/\/\/[a-z][a-zA-z0-9\-\_]+\/[a-z][a-zA-z0-9\-\_]+\/commit\/[a-f0-9]+/g;
            let match = location.match(validatorRegex);
zmarkan / Enable Virtualenv Python3
Last active May 4, 2020
Python 3 init and use virtualenv
View Enable Virtualenv Python3
# Run in empty dir:
python3 -m venv .env
# Enable venv
. .env/bin/activate && python -V
zmarkan / crash_preventing_crash_android_oreo.kt
Created Nov 22, 2017
Code to cause a preventive crash if using Adaptive Icons with Android Oreo, in order to avoid a crash loop
View crash_preventing_crash_android_oreo.kt
private fun hasDefaultFCMIconInMetadata(context: Context): Boolean {
try {
val appInfo = context.packageManager.getApplicationInfo(
context.packageName, PackageManager.GET_META_DATA)
if (appInfo.metaData != null) {
return appInfo.metaData.getInt(META_DATA_FIREBASE_NOTIFICATION_IMAGE, -1) != -1
} catch (_: PackageManager.NameNotFoundException) {

Keybase proof

I hereby claim:

  • I am zmarkan on github.
  • I am zmarkan ( on keybase.
  • I have a public key whose fingerprint is 8517 B907 4A44 4A05 44B6 5627 A198 C8CF 11DD BA67

To claim this, I am signing this object:

zmarkan /
Created Dec 17, 2015
Cooking Clean Architecture sample code, used to present on Codemotion Tel Aviv 2015 (Absolutely non compilable pseudocode samples to show concepts)
// Sample basket data entity
class BasketItem{
int id;
String name;
String imageUrl;
int quantity;
float price;
public interface HTTPHelperWrapper {
//your methods go here
void getRequest(Callback callback);
public class HTTPHelperWrapperImpl overrides HTTPHelperWrapper {
public void getRequest(Callback callback){