Skip to content

Instantly share code, notes, and snippets.

View watou's full-sized avatar

John Cocula watou

  • Cocula Software
  • Europe and U.S.
View GitHub Profile
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

# This file is part of VISVIS. This file may be distributed
# seperately, but under the same license as VISVIS (LGPL).
#
# images2gif is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# images2gif is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@BFTrick
BFTrick / woocommerce-remove-virtual-billing-fields.php
Last active February 19, 2024 17:23
Remove the billing address fields for free virtual orders in WooCommerce
<?php
/**
* Plugin Name: WooCommerce Remove Billing Fields for Free Virtual Products
* Plugin URI: https://gist.github.com/BFTrick/7873168
* Description: Remove the billing address fields for free virtual orders
* Author: Patrick Rauland
* Author URI: http://patrickrauland.com/
* Version: 2.0
*
* This program is free software: you can redistribute it and/or modify
@jpmens
jpmens / Raspi-Stack.md
Created July 15, 2016 09:25
Manifest for Raspberry Pi (2B & 3) "cluster"

Case

You need one of the Raspi cases (1st item below), and 1 intermediate stacking plate (2nd item below) for a second RPi. So, for 3 RPi: 1 case, 2 intermediate plates.

The bottom plate of the case goes at the bottom of the stack. The top plate of the case way at the top of the stack. The products come with all required parts (nuts, bolts, standoffs, etc.)

Shopping list

@linxlad
linxlad / proxy.php
Last active August 12, 2019 15:48 — forked from iovar/proxy.php
Simple PHP Proxy Script
<?php
$method = $_SERVER['REQUEST_METHOD'];
if ($_GET && $_GET['url']) {
$headers = getallheaders();
$headers_str = [];
$url = $_GET['url'];
foreach ( $headers as $key => $value){
if($key == 'Host')
@krisleech
krisleech / renew-gpgkey.md
Last active November 13, 2024 19:10
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@JoeyBurzynski
JoeyBurzynski / getStatusCode.gs
Last active September 11, 2024 18:13
Google Sheets Function (SEO, How to Fetch HTTP Status Code for URL in Google Sheets)
/**
Google Sheets Function (Fetch HTTP Status Code for URL)
How to Fetch HTTP Status Code for URL in Google Sheets
Reference URL: https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app
**/
function getStatusCode(url){
var options = {
'muteHttpExceptions': true,
'followRedirects': false