git format-patch -1 <sha>
OR
git format-patch -1 HEAD
git apply --stat file.patch
# show stats.
git apply --check file.patch
# check for error before applying
import yaml | |
def load_and_assert_uniqueness(x): | |
# We'd like to detect duplicates. Since PyYAML both loads things depth-first | |
# *and* doesn't give us the parent when processing a child node, we'll index | |
# of all of the object IDs as we're constructing them, and then see which | |
# are disappeared from the final hierarchy. Since all we can do is pass a | |
# class, we need to inline the class in order to load into an index within | |
# our scope. |
import logging | |
import ldap | |
import collections | |
# Install: | |
# | |
# apt: libsasl2-dev | |
# pip: python-ldap | |
# |
#!/usr/bin/env python3 | |
import sys | |
import os | |
import argparse | |
import shutil | |
_DESCRIPTION = "Strip extended characters from all non-hidden files in a path." | |
def _get_args(): |
/* | |
This file had now been added to the git repo | |
https://github.com/darrenjs/openssl_examples | |
... which also includes a non blocking client example. | |
------------------------------------------------------------------------------- | |
ssl_server_nonblock.c -- Copyright 2017 Darren Smith -- MIT license |
#!/usr/bin/env python3.5 | |
""" | |
A simple module to resolve a Go import path to the actual URL that hosts that | |
package. Sometimes these are not equal and you mustload one URL (and zero or | |
more redirects) until we encounter a meta tag that specifies the true import | |
URL. | |
Requirements: | |
- requests | |
- beautifulsoup4 |
#!/bin/sh | |
# | |
# Shell script for installation and setup of L2TP/IPsec VPN tunnel in site-to-site | |
# mode (e.g. connecting two inter-regional VPCs). VPN software is libreswan. | |
# | |
# This should work on linux systems that are RHEL based. | |
# | |
# To install directly from this gist, you can curl the "raw" version and pipe that to | |
# "bash -s" while also defining the environment variables: | |
# |
To remove a submodule you need to:
/* | |
* GraxRabble | |
* 04 MAY 2014 | |
* Note this was created for the 4.5 version of libSodium. | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include "sodium.h" /* library header */ |