Skip to content

Instantly share code, notes, and snippets.

@paolocarrasco
paolocarrasco / README.md
Last active April 7, 2025 22:13
How to understand the `gpg failed to sign the data` problem in git

Problem

You have installed GPG, then tried to commit and suddenly you see this error message after it:

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

Debug

@tyabu12
tyabu12 / upload_to_vagrant_cloud.sh
Last active November 4, 2022 07:46
Vagrant cloud upload script.
#!/bin/bash
USERNAME="CHANGE ME"
PROVIDER_NAME="virtualbox"
ACCESS_TOKEN="CHANGE ME"
set -eu
if [ $# -ne 3 ]; then
cat <<_EOT_
@ssaurel
ssaurel / JavaHTTPServer.java
Created April 28, 2018 18:08
Simple HTTP Web Server made in Java for a tutorial on the SSaurel's Blog
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.ServerSocket;
@deoren
deoren / Ubuntu_on_Hyper-V.md
Last active May 8, 2023 11:01
Ubuntu on Hyper-V

Enabling full Hyper-V support for Ubuntu

Install packages

Short version: See docs.microsoft.com link below.

Ubuntu 17.04 and later

  1. sudo apt-get update
  2. sudo apt-get install linux-image-virtual linux-tools-virtual linux-cloud-tools-virtual
@dragolabs
dragolabs / proxmox-cli-and-tips.md
Last active November 28, 2024 23:07
Useful proxmox commands

Find next free VM ID

pvesh get /cluster/nextid

Create containter with external and internal nets

pct create 100 \
    local:vztmpl/ubuntu-16.04-standard_16.04-1_amd64.tar.gz \
    --cores 2 --cpuunits 1024 \
@iffy
iffy / .gitignore
Last active January 8, 2025 06:32
Example using electron-updater with `generic` provider.
node_modules
dist/
yarn.lock
wwwroot
@dragonken
dragonken / .vimrc
Last active January 9, 2025 13:39
YAML space indent for vim
syntax on
filetype plugin indent on
"Get the 2-space YAML as the default when hit carriage return after the colon
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
set is hlsearch ai ic scs
nnoremap <esc><esc> :nohls<cr>
"https://vim.fandom.com/wiki/Moving_lines_up_or_down
@rajkrrsingh
rajkrrsingh / Google protobuf installation on Mac
Created November 27, 2016 10:57
Steps to Install google protobuf on Mac
$wget https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.bz2
$tar xvf protobuf-2.5.0.tar.bz2
$cd protobuf-2.5.0
$./configure CC=clang CXX=clang++ CXXFLAGS='-std=c++11 -stdlib=libc++ -O3 -g' LDFLAGS='-stdlib=libc++' LIBS="-lc++ -lc++abi"
$make -j 4
$sudo make install
$protoc --version
@cedricvidal
cedricvidal / README.md
Created October 29, 2016 14:03
Netflix Eureka curl registration

Registration

curl -v -X POST -H "Accept: application/xml" -H "Content-type: application/xml" --data @reg.xml http://localhost:8761/eureka/apps/test

Listing

curl -X GET -H "Accept: application/json" http://localhost:8761/eureka/apps
@smoll
smoll / USING-DIFFMERGE.md
Last active March 28, 2025 01:01
Using DiffMerge as your git mergetool (for Mac OS X / macOS)