Skip to content

Instantly share code, notes, and snippets.

View mirrajabi's full-sized avatar
🕺

Mad Mirrajabi mirrajabi

🕺
View GitHub Profile
# Assume we are in your home directory
cd ~/
# Clone the repo from GitLab using the `--mirror` option
$ git clone --mirror git@your-gitlab-site.com:mario/my-repo.git
# Change into newly created repo directory
$ cd ~/my-repo.git
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.
@mirrajabi
mirrajabi / generatepublicresources.gradle
Created April 19, 2017 09:02 — forked from HannahMitt/generatepublicresources.gradle
This is a gradle task to generate the public.xml file in an Android library project. It assumes all public resources are kept in a res-public/ resource source directory. Providing this as a starting point, but there may be more efficient ways.
import groovy.xml.MarkupBuilder
// Task to generate our public.xml file
// See https://developer.android.com/studio/projects/android-library.html#PrivateResources
// We assume resources within res-public are public
task generatepublicxml {
def resDir = project.projectDir.absolutePath + "/src/main/res-public"
// Include the desired res types
@mirrajabi
mirrajabi / Album.java
Created December 12, 2016 12:04 — forked from krzysztof-miemiec/Album.java
List parsing done with LoganSquare and Realm database.
/**
* Sample class showing how to use type converter in this gist.
*
* @author Krzysztof Miemiec
*/
@JsonObject
public class Album extends RealmObject {
@PrimaryKey
@JsonField