Skip to content

Instantly share code, notes, and snippets.

View andipaetzold's full-sized avatar
🤓
Coding

Andi Pätzold andipaetzold

🤓
Coding
View GitHub Profile
#!/bin/bash
set -eo pipefail
echo "Deleting existing hosting releases"
SITE=$1
echo "Site: $SITE"
HEADER_AUTH="Authorization: Bearer "$(gcloud auth application-default print-access-token)"";
@andipaetzold
andipaetzold / buildcommand.txt
Last active August 27, 2015 20:53
Pre-build command line to prevent the remote debugger from locking the executable.
if exist "$(TargetPath).locked" del "$(TargetPath).locked"
if exist "$(TargetPath)" if not exist "$(TargetPath).locked" move "$(TargetPath)" "$(TargetPath).locked"
@andipaetzold
andipaetzold / script
Last active August 29, 2015 14:24
Bootstrap Navbar Hover
// https://scotch.io/bar-talk/bootstrap-3-tips-and-tricks-you-might-not-know#how-to-enable-bootstrap-3-hover-dropdowns
$('.dropdown-toggle').click(function() {
var location = $(this).attr('href');
window.location.href = location;
return false;
});
@andipaetzold
andipaetzold / .gitignore
Last active August 29, 2015 14:19
VisualStudio gitignore
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
@andipaetzold
andipaetzold / dataURLToBlob.js
Created February 19, 2015 14:39
Data URL to Blob in JavaScript
// source: https://github.com/ebidel/filer.js/blob/b7ab6f4cbb82a17565ff68227e5bc984a9934038/src/filer.js#L137-159
var dataURLToBlob = function(dataURL)
{
var BASE64_MARKER = ";base64,";
if (dataURL.indexOf(BASE64_MARKER) == -1)
{
var parts = dataURL.split(",");
var contentType = parts[0].split(":")[1];
var raw = decodeURIComponent(parts[1]);
@andipaetzold
andipaetzold / aspect-ratio.scss
Last active August 29, 2015 14:15
Container with fixed aspect ratio. Size is based on the current viewport.
$ratio-height: 3;
$ratio-width: 4;
$margin: 0.1;
div#selector {
width: (1 - $margin) * 100vw;
height: (1 - $margin) * $ratio-height / $ratio-width * 100vw;
max-height: (1 - $margin) * 100vh;
max-width: (1 - $margin) * $ratio-width / $ratio-height * 100vh;
}