Skip to content

Instantly share code, notes, and snippets.

View lhaussknecht's full-sized avatar

Louis Haußknecht lhaussknecht

View GitHub Profile
@zytek
zytek / README.md
Last active May 6, 2024 23:16
Terraform to manage AWS RDS PostgreSQL databases, users and owners

Terraform vs PostgreSQL RDS

Thanks to new resources (postgresql_default_priviledges) and some fixes Terraform can now add new databases and manage ownership / access to them.

This example creates new database and two users. You can use owner to create new tables and run migrations and user for normal read/write access to database.

@brenopolanski
brenopolanski / merge-pdf-ghostscript.md
Last active May 2, 2024 06:56
Merge multiple PDFs using Ghostscript

A simple Ghostscript command to merge two PDFs in a single file is shown below:

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combine.pdf -dBATCH 1.pdf 2.pdf

Install Ghostscript:

Type the command sudo apt-get install ghostscript to download and install the ghostscript package and all of the packages it depends on.

@cmc19
cmc19 / chrome.intellisense.js
Last active March 9, 2024 17:52
Visual studio intellisense file for chrome apps and extensions. Generated from latest source code.
var chrome = {};
chrome.devtools = {};
chrome.declarativeWebRequest = {};
//#region Types
//#region Chrome.AccessibilityObject
chrome.AccessibilityObject = function () {
/// <field name='type' type='string'>The type of this object, which determines the contents of 'details'.</field>
/// <field name='name' type='string'>The localized name of the object, like OK or Password. Do not rely on an exact string match because the text will be in the user's language and may change in the future.</field>
/// <field name='context' type='string'>The localized name of the context for the object, like the name of the surrounding toolbar or group of controls.</field>
/// <field name='details' type=''>Other details like the state, depending on the type of object.</field>
@adam-singer
adam-singer / buildit.bat
Created July 19, 2012 07:22
Building dart on win32, the quick guide
cd c:\
mkdir dart_bleeding
svn co http://gyp.googlecode.com/svn/trunk build/gyp
mkdir dart-repo
set Path=%PATH%;c:\dart_bleeding\build\gyp\
git svn clone -rHEAD "https://dart.googlecode.com/svn/branches/bleeding_edge/dart" dart
gclient config "https://dart.googlecode.com/svn/branches/bleeding_edge/deps/all.deps"
cd dart
gclient sync
gclient runhooks
@borismus
borismus / gist:1032746
Created June 18, 2011 02:46
Convert a base64 string into a binary Uint8 Array
var BASE64_MARKER = ';base64,';
function convertDataURIToBinary(dataURI) {
var base64Index = dataURI.indexOf(BASE64_MARKER) + BASE64_MARKER.length;
var base64 = dataURI.substring(base64Index);
var raw = window.atob(base64);
var rawLength = raw.length;
var array = new Uint8Array(new ArrayBuffer(rawLength));
for(i = 0; i < rawLength; i++) {
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@graylikeme
graylikeme / gist:923618
Created April 16, 2011 23:34
Ninject MVC3 loader in VB(NinjectMVC3.vb)
Imports Microsoft.Web.Infrastructure.DynamicModuleHelper
Imports Ninject
Imports Ninject.Web.Mvc
<Assembly: WebActivator.PreApplicationStartMethod(GetType(applicationName.App_Start.NinjectMVC3), "StartNinject")>
<Assembly: WebActivator.ApplicationShutdownMethodAttribute(GetType(applicationName.App_Start.NinjectMVC3), "StopNinject")>
Namespace applicationName.App_Start
Public Module NinjectMVC3
Private ReadOnly bootstrapper As New Bootstrapper()