Skip to content

Instantly share code, notes, and snippets.

View danielpassos's full-sized avatar

Daniel Passos danielpassos

View GitHub Profile
@paolocarrasco
paolocarrasco / README.md
Last active December 15, 2025 19:18
How to understand the `gpg failed to sign the data` problem in git

Problem

You have installed GPG, then tried to perform a git commit and suddenly you see this error message after it 😰

error: gpg failed to sign the data
fatal: failed to write commit object

Understand the error (important to solve it later!)

# This tells kubecfg to read its config from the local directory
export KUBECONFIG=./kubeconfig
# Looking at the cluster
kubectl get nodes
kubectl get pods --namespace=kube-system
# Running a single pod
kubectl run --generator=run-pod/v1 --image=gcr.io/kuar-demo/kuard-amd64:1 kuard
kubectl get pods
Ensure Docker >=v1.10.3 is installed
Ensure fhc is installed from this branch
​npm i -g git://github.com/feedhenry/fh-fhc.git#workshop
Ensure 'oc' is installed
(Linux) curl -O http://192.168.1.247:8080/oc-linux.tar.gz
(Mac) curl -O http://192.168.1.247:8080/oc-mac.tar.gz
Clone these public repos into the same folder (preferably ~/work/)
feedhenry/fh-core-openshift-templates#master
feedhenry/fh-mbaas-openshift-templates#master
feedhenry/fh-cup#master
@nobitagit
nobitagit / iterm2.md
Last active July 30, 2024 01:01
iterm2 cheatsheet

This gist has been moved to its own Github repo, so it's easier to contribute with additions and corrections. Please open a PR there if you see any mistake, I don't track comments on here as there's no notification system for gists AFAIK. Thanks.

Tabs and Windows

Function Shortcut
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
@danieleggert
danieleggert / GPG and git on macOS.md
Last active October 2, 2025 21:19
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
@luciofm
luciofm / build.gradle
Created December 2, 2015 14:59
Auto increment version number on release builds... You can change the build type on versionCode.gradle, you also will need to commit and push gradle.properties on your CI
apply from: 'versionCode.gradle'
android {
defaultConfig {
versionName VERSION_NAME
versionCode Integer.parseInt(VERSION_CODE)
}
}
@Phlow
Phlow / for-loop-sorted-collection
Last active April 30, 2024 13:30
This Liquid loop for Jekyll sorts a collection by date in reverse order
{% comment %}
*
* This loop loops through a collection called `collection_name`
* and sorts it by the front matter variable `date` and than filters
* the collection with `reverse` in reverse order
*
* To make it work you first have to assign the data to a new string
* called `sorted`.
*
{% endcomment %}
#what is my tenant
curl -ivX GET -H "Content-Type: application/json" 'http://jdoe:password@localhost:8080/hawkular/inventory/tenant' | less
#create resource
curl -ivX POST -H "Content-Type: application/json" -d '{"id": "foobar", "resourceTypeId": "URL", "properties": {"url": "http://hawkular.org"}}' 'http://jdoe:[email protected]:8080/hawkular/inventory/test/resources' | less
#create metric type
curl -ivX POST -H "Content-Type: application/json" -d '{"id":"MetricType", "unit":"BYTE"}' 'http://jdoe:password/127.0.0.1:8080/hawkular/inventory/metricTypes' | less
@yqritc
yqritc / gist:ccca77dc42f2364777e1
Last active January 25, 2025 17:43
Equal column spacing for Android RecyclerView GridLayoutManager by using custom ItemDecoration

ItemOffsetDecoration

public class ItemOffsetDecoration extends RecyclerView.ItemDecoration {

    private int mItemOffset;

    public ItemOffsetDecoration(int itemOffset) {
        mItemOffset = itemOffset;
    }
@premnirmal
premnirmal / GZipRequest.java
Last active December 20, 2022 06:07
Parse GZip responses using volley
import com.android.volley.NetworkResponse;
import com.android.volley.ParseError;
import com.android.volley.Response;
import com.android.volley.toolbox.HttpHeaderParser;
import com.android.volley.toolbox.StringRequest;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStreamReader;