Skip to content

Instantly share code, notes, and snippets.

View gfpacheco's full-sized avatar
🏠
Working from home

Guilherme Pacheco gfpacheco

🏠
Working from home
View GitHub Profile
@gfpacheco
gfpacheco / ParseBezelImageView.java
Created May 12, 2015 21:57
Merge Google's BezelImageView implementation and ParseImageView
package com.gfpacheco.views.widget;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.ColorMatrix;
import android.graphics.ColorMatrixColorFilter;
import android.graphics.Paint;
import android.graphics.PorterDuff;
@gfpacheco
gfpacheco / PaddedToolbar.java
Last active August 29, 2015 14:21
A Toolbar subclass meant to be used by Fragments inside a translucent Activity that adds padding to itself to avoid being under the status bar
package com.gfpacheco.views.widget;
import android.content.Context;
import android.os.Build;
import android.support.v7.widget.Toolbar;
import android.util.AttributeSet;
public class PaddedToolbar extends Toolbar {
static int sStatusBarHeight = -1;
@gfpacheco
gfpacheco / CaptainFragment.java
Last active August 29, 2015 14:21
A simple Fragment container meant to be used inside a ViewPager where it can then navigate to other Fragments
package com.gfpacheco.views.widget;
import android.annotation.SuppressLint;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
@gfpacheco
gfpacheco / RadioGridGroup.java
Created June 4, 2015 01:04
A GridLayout subclass that serves as RadioButton group and has same methods than original RadioGroup
package com.gfpacheco.views.widget;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.AppCompatRadioButton;
import android.support.v7.widget.GridLayout;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityEvent;
@gfpacheco
gfpacheco / BlurTransformation.java
Created August 15, 2015 19:03
Picasso blur transformation compatible with older version of Android
package com.gfpacheco;
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Bitmap;
import android.os.Build;
import android.support.v8.renderscript.Allocation;
import android.support.v8.renderscript.Element;
import android.support.v8.renderscript.RenderScript;
import android.support.v8.renderscript.ScriptIntrinsicBlur;
class PlaceholderTextView: UIView, UITextViewDelegate {
private var textView: UITextView!
private var isShowingPlaceholder = false
var placeholder = "" {
didSet {
showPlaceholderIfNeeded()
}
}
yarn test v0.24.5
$ make prepush
./node_modules/.bin/eslint '.'
lib/plugins/conditional_request.js
115:8 warning Unexpected todo comment no-warning-comments
test/formatter.test.js
107:8 warning Unexpected todo comment no-warning-comments

Hello Why, we’re having issues getting the submit voucher message on the chain, do you think you can help us?

These are the steps that end up returning the ExitCode 1 for the submit voucher message:

  1. CLIENT creates the payment channel
{
  "Message": {
    "From": "t16w4gy7cx7l37ouxsorwdedwjkclj67hbeq4zdli",
 "GasLimit": 20000000,
@gfpacheco
gfpacheco / UIView+inset+next.swift
Created July 26, 2021 20:04
UIView extension that makes it easier to write auto layout constraints
import UIKit
extension UIView {
func inset(into view: UIView, allSides: CGFloat = 0) -> [NSLayoutConstraint] {
inset(into: view, horizontal: allSides, vertical: allSides)
}
func inset(into view: UIView, horizontal: CGFloat? = nil, vertical: CGFloat? = nil) -> [NSLayoutConstraint] {
inset(into: view, leading: horizontal, trailing: horizontal, top: vertical, bottom: vertical)
}