Skip to content

Instantly share code, notes, and snippets.

View Jazzo's full-sized avatar

Davide Gullo Jazzo

View GitHub Profile
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@evantoli
evantoli / GitConfigHttpProxy.md
Last active July 20, 2024 03:29
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@remyd1
remyd1 / gist:a353b07219884c5878cc27d04aab9d96
Last active January 25, 2021 17:42
caldav_api bash with curl
#!/bin/bash
#set -x
source .client_config
usage="$0 report [START DATE (YYMMDD)] [END DATE (YYMMDD)] \n
or \n $0 propfind \n
or \n $0 get [ics] \n"
@mdonkers
mdonkers / server.py
Last active July 22, 2024 13:51
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
License: MIT License
Copyright (c) 2023 Miel Donkers
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
@antoniocampos
antoniocampos / SolveCRLExpired.sh
Last active October 4, 2022 17:59
Solve OpenVPN 2.4 Error = CRL has expired
#OpenVPN 2.4 no longer accepts CRLs who's nextUpdate field lies in the past.
#
# me@antoniocampos.net 2017
# no need for any change at the client side
# you may want to increase the CRL EXPIRE period
# just increase the value default_crl_days = ?? in the openssl.cnf
# tested with Debian 9 and OpenVPN 2.4
cd /etc/openvpn/2.0/
export KEY_CN="My VPN Server"
export KEY_OU="IT Dep"
@JonathonReinhart
JonathonReinhart / ctypes_structs_example.py
Last active November 4, 2022 13:39
Using Python ctypes to manipulate binary data
#!/usr/bin/env python3
from __future__ import print_function
from tempfile import TemporaryFile
from binascii import hexlify
from ctypes import *
class StructHelper(object):
def __get_value_str(self, name, fmt='{}'):
val = getattr(self, name)