Skip to content

Instantly share code, notes, and snippets.

View bfernandesbfs's full-sized avatar

Bruno Fernandes bfernandesbfs

View GitHub Profile
@LuizZak
LuizZak / README.md
Last active February 22, 2019 00:50
A chainable, storable, composable configuration object featuring Swift keypaths

With.swift - A chainable, storable, composable configuration object featuring Swift keypaths

Based on some source I don't exactly remember right now but will add a link to later.

// When used on instances, allows changing fields directly using keypaths (handy way to avoid 'lazy var' property closures!)
let label
    = UILabel()
        .with(\.text, setTo: "Hello!")
        .with(\.textColor, setTo: UIColor.darkGray)
@edwin-sl
edwin-sl / NetworkRequest.java
Created October 15, 2015 07:46
A layer on top of Volley for Android to make GET and POST requests with JSONs as result
package com.stochasticstudio.utils;
import android.content.Context;
import android.graphics.Bitmap;
import android.support.v4.util.LruCache;
import android.util.Log;
import com.android.volley.AuthFailureError;
import com.android.volley.DefaultRetryPolicy;
import com.android.volley.Request;
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule