Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View LeSpocky's full-sized avatar

Alexander Dahl LeSpocky

View GitHub Profile
@okunishinishi
okunishinishi / Remove all git tags
Created March 8, 2014 03:12
Delete all git remote tags
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
@dideler
dideler / upgrade-postgres-9.3-to-9.4.md
Last active June 8, 2020 03:24
Upgrading PostgreSQL from 9.3 to 9.4 when upgrading Ubuntu 14.04 to 14.10

TL;DR

Create a backup:

pg_dumpall > mybackup.sql

Perform the upgrade:

sudo pg_dropcluster 9.4 main --stop
@topheman
topheman / git-notes.md
Created June 29, 2015 17:39
Git notes cheat sheet
@JonathonReinhart
JonathonReinhart / sample_output
Created July 29, 2016 15:12
Show Ethernet drivers on Linux
$ ~/what_eth_drivers.sh
eth0 [52:54:00:aa:bb:cc]: virtio_net (up)
eth1 [52:54:00:dd:ee:ff]: virtio_net (up)
eth2 [52:54:00:99:88:77]: virtio_net (up)
lo [00:00:00:00:00:00]: (unknown)
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active April 23, 2024 03:11
Hyperlinks in Terminal Emulators
@highgain86j
highgain86j / nginx config for icecast2
Last active February 3, 2023 13:06
nginx configuration for reverse-proxying icecast2 streaming server.
server {
listen 80;
listen [::]:80;
server_name radio.example.com;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
location / {
@oseiskar
oseiskar / swagger-yaml-to-html.py
Last active April 3, 2024 15:24
Converts Swagger YAML to a static HTML document (needs: pip install PyYAML)
#!/usr/bin/python
#
# Copyright 2017 Otto Seiskari
# Licensed under the Apache License, Version 2.0.
# See http://www.apache.org/licenses/LICENSE-2.0 for the full text.
#
# This file is based on
# https://github.com/swagger-api/swagger-ui/blob/4f1772f6544699bc748299bd65f7ae2112777abc/dist/index.html
# (Copyright 2017 SmartBear Software, Licensed under Apache 2.0)
#
@likema
likema / glibc.cmake
Last active October 13, 2023 09:20
CMake macro to detect glibc version by filename.
# - Check glibc version
# CHECK_GLIBC_VERSION()
#
# Once done this will define
#
# GLIBC_VERSION - glibc version
#
MACRO (CHECK_GLIBC_VERSION)
EXECUTE_PROCESS (
COMMAND ${CMAKE_C_COMPILER} -print-file-name=libc.so.6
@marckleinebudde
marckleinebudde / gs_usb-protocol.rst
Last active February 22, 2024 08:11
gs_usb protocol definition
enum gs_usb_breq {
    GS_USB_BREQ_HOST_FORMAT = 0,
    GS_USB_BREQ_BITTIMING,
    GS_USB_BREQ_MODE,
    GS_USB_BREQ_BERR,
    GS_USB_BREQ_BT_CONST,
    GS_USB_BREQ_DEVICE_CONFIG,
    GS_USB_BREQ_TIMESTAMP,