Skip to content

Instantly share code, notes, and snippets.

View uilianries's full-sized avatar

Uilian Ries uilianries

View GitHub Profile
@gobinathm
gobinathm / shallow_update_git.md
Created March 6, 2017 18:24
Fix for Remote rejected shallow update not allowed after changing Git remote URL

Some Time there is a shallow update not allowed issue in your cloned GIT repo.

This means that you have to unshallow your repository. To do so you will need to add your old remote again.

git remote add origin <path-to-old-remote> After that we use git fetch to fetch the remaining history from the old remote (as suggested in this answer).

git fetch --unshallow origin And now you should be able to push into your new remote repository.

@joseluisq
joseluisq / terminal-git-branch-name.md
Last active April 20, 2024 02:26
Add Git Branch Name to Terminal Prompt (Linux/Mac)

Add Git Branch Name to Terminal Prompt (Linux/Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
@jephir
jephir / playbook.yml
Created September 4, 2014 19:30
Ansible Playbook for installing Revel
---
- hosts: all
tasks:
- name: install go
pkgng: name=go
sudo: yes
- name: install git
pkgng: name=git
sudo: yes
- name: install mercurial
@jephir
jephir / Vagrantfile
Created September 4, 2014 19:29
Vagrantfile for FreeBSD with Ansible
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "chef/freebsd-10.0"
config.vm.network "private_network", type: "dhcp"
config.vm.synced_folder ".", "/vagrant", type: "nfs"
@jpmens
jpmens / sub2gelf.c
Last active July 30, 2019 14:21
Send MQTT payloads (incl JSON) as UDP GELF (compressed) to Graylog2
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netdb.h>