Skip to content

Instantly share code, notes, and snippets.

View youcef-debbah's full-sized avatar
👨‍💻
Expanding my horizons

Youcef DEBBAH youcef-debbah

👨‍💻
Expanding my horizons
View GitHub Profile
@Ithildir
Ithildir / build.gradle
Created September 3, 2016 00:35
Exclude snapshots on range dependencies
import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.VersionSelectorScheme
apply plugin: "java"
apply plugin: "maven"
group = "com.example"
String installVersion = System.getProperty("installVersion")
if (installVersion) {
@omarmiatello
omarmiatello / ParcelableUtil.java
Last active January 28, 2023 01:24
Parcelable to byte array, byte array to parcelable
/**
* Copyright 2013 Omar Miatello - omar.miatello@justonetouch.it
* Based on http://stackoverflow.com/a/18000094/1228545
*
* Licensed 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@trietptm
trietptm / gist:4290757
Created December 15, 2012 02:25
Finding all permutations of a list(PROLOG) a snippet that lists all the possible permutations of a list
appendlist([], X, X).
appendlist([T|H], X, [T|L]) :- appendlist(H, X, L).
permutation([], []).
permutation([X], [X]) :-!.
permutation([T|H], X) :- permutation(H, H1), appendlist(L1, L2, H1), appendlist(L1, [T], X1), appendlist(X1, L2, X).