Skip to content

Instantly share code, notes, and snippets.

View lawrencegripper's full-sized avatar

Lawrence Gripper lawrencegripper

View GitHub Profile
@garfoot
garfoot / Renew-AzureRmSslCerts.ps1
Created June 7, 2017 11:33
Powershell script to renew all web apps' SSL certs that match the given domain
param(
[string] $Domain,
[string] $CertFile,
[string] $CertPassword
)
# This could all be done with a single PS line but it wasn't pretty!
$ProgressPreference = "SilentlyContinue"
Write-Host Downloading web app details -ForegroundColor Green
$apps = Get-AzureRMWebApp
@itod
itod / split_keyboards.md
Last active April 26, 2025 15:22
Every "split" mechanical keyboard currently being sold that I know of
@ankurk91
ankurk91 / github_gpg_key.md
Last active April 14, 2025 13:42
Signing git commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
@maoueh
maoueh / test-cloud-init-run.sh
Created June 2, 2016 14:28
Small script to test changes made to cloud init config without rebooting
rm -rf /var/lib/cloud/instance && rm -rf /var/lib/cloud/instances/* && rm -rf /var/lib/cloud/sem/*
cloud-init init && cloud-init modules --mode config && cloud-init modules --mode final
@MichaelPote
MichaelPote / himawari.ps1
Created February 3, 2016 19:11
Windows Powershell Script to download the latest image from the Himawari-8 satelite, combine the tiles into a single image, convert to jpg and then set as the desktop background.
#
# Himawari-8 Downloader
#
#
#
# This script will scrape the latest image from the Himawari-8 satellite, recombining the tiled image,
# converting it to a JPG which is saved in My Pictures\Himawari\ and then set as the desktop background.
#
# http://himawari8.nict.go.jp/himawari8-image.htm
#
@dwilkie
dwilkie / ubuntu_unattended_upgrades_gmail.markdown
Created July 2, 2015 10:28
Setup unattended upgrades on Ubuntu with Gmail

Install the unattended-upgrades package

$ sudo apt-get install unattended-upgrades 

Edit the periodic configuration

$ sudo nano /etc/apt/apt.conf.d/10periodic
@RhysC
RhysC / RedisRx.linq
Created October 21, 2014 12:02
LinqPad sample of Redis Pub sub using StackExchange.Redis and RX
<Query Kind="Program">
<NuGetReference>Newtonsoft.Json</NuGetReference>
<NuGetReference>Rx-Main</NuGetReference>
<NuGetReference>StackExchange.Redis</NuGetReference>
<Namespace>System.Reactive.Linq</Namespace>
<Namespace>System.Reactive.Disposables</Namespace>
<Namespace>StackExchange.Redis</Namespace>
</Query>
void Main()
@xpando
xpando / unzip.ps1
Last active June 27, 2019 11:01
Powershell function to unzip files using 7zip. Accounts for tar.ga and tgz files. Uses piping to process gzipped tar files in a single pass.
function unzip($path,$to) {
$7z = "$env:TEMP\7z"
if (!(test-path $7z) -or !(test-path "$7z\7za.exe")) {
if (!(test-path $7z)) { md $7z | out-null }
push-location $7z
try {
write-host "Downloading 7zip" -foregroundcolor cyan
$wc = new-object system.net.webClient
$wc.headers.add('user-agent', [Microsoft.PowerShell.Commands.PSUserAgent]::FireFox)
$wc.downloadFile("http://softlayer-dal.dl.sourceforge.net/project/sevenzip/7-Zip/9.20/7za920.zip","$7z\7z.zip")
@rodneyrehm
rodneyrehm / gist:40e7946c0cff68a31cea
Last active March 12, 2025 19:23
Diagrams for Documentation

some tools for diagrams in software documentation

Diagrams For Documentation

Obvious Choices

ASCII

@michaljemala
michaljemala / tls-client.go
Last active April 28, 2025 07:59
SSL Client Authentication Golang sample
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"io/ioutil"
"log"
"net/http"
)