Skip to content

Instantly share code, notes, and snippets.

View maersu's full-sized avatar

Marcel Eyer maersu

View GitHub Profile
@maersu
maersu / clutter-free-vscode.jsonc
Created January 2, 2024 17:56 — forked from kamilogorek/_screenshot.md
Clutter-free VS Code Setup
// Required Plugin: https://marketplace.visualstudio.com/items?itemName=drcika.apc-extension
// settings.json
{
// Remove left-side icons
"workbench.activityBar.location": "hidden",
// Remove bottom status bar
"workbench.statusBar.visible": false,
// Remove position indicator in the editor's scrollbar
"editor.hideCursorInOverviewRuler": true,
@maersu
maersu / backend.Dockerfile.override
Last active August 31, 2022 06:55
Athena Docker for M1
FROM node:16-bullseye-slim AS builder
RUN apt-get update
RUN apt-get install -y openssl libvips
RUN mkdir /app
WORKDIR /app
COPY package.json package-lock.json ./
@maersu
maersu / db.lib.sh
Last active June 10, 2023 14:56
Function to create db env vars based on a database url (e.g from heroku)
#!/bin/bash
# Function that sets environement variables with the credentials of the given database url
#
# set_credential_envs_from_url <database_url> <env_prefix>
#
# Example:
#
# set_credential_envs_from_url 'proto://user:pass@host:1234/db' 'DATABASE'
#
# Exports the following variabls
# -*- coding: utf-8 -*-
#
# Created on 9/1/15 by maersu
#
# Requirements:
# pip install ijson
#
# Exmaple:
#
# Folder:
@maersu
maersu / filter_gps.py
Created October 23, 2014 18:59
filter_gps.py
# removes all image without gps data
# example:
# python filter_gps.py './*.jpg'
import Image, ImageFile
import glob
from PIL.ExifTags import TAGS, GPSTAGS
import os
@maersu
maersu / toFile.php
Last active August 29, 2015 14:02
php write to file
public function toFile($content)
{
$file = '~/Desktop/log.txt';
file_put_contents($file, $content . "\n", FILE_APPEND | LOCK_EX);
}