Skip to content

Instantly share code, notes, and snippets.

View gruessung's full-sized avatar

Alexander Grüßung gruessung

View GitHub Profile
@gruessung
gruessung / install_docker.sh
Created April 4, 2024 12:34
Install Docker and Portainer on Debian
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
@gruessung
gruessung / index.php
Created April 5, 2018 08:40
OSM PHP Cache
<?php
if (strpos($_SERVER['HTTP_REFERER'], 'yourdomain.com') === false) {
header('HTTP/1.0 403 Forbidden');
die('forbidden for '.$_SERVER['HTTP_REFERER']);
}
header('Access-Control-Allow-Origin: *');
$sSub = $_GET['sub'];
$iZ = $_GET['z'];
$iY =$_GET['y'];
@gruessung
gruessung / add_domain.sh
Last active October 30, 2018 10:22
This script generate a yourdomain.conf in /etc/nginx/sites-enabled/ and generate a Let's Encrypt certificate with certbot (You have to install certbot manually!)
#!/bin/bash
# Shell script to add a subdomain to nginx with let's encrypt
DOMAIN=""
PROXY=false
DOCROOT="/var/www/html/"
function usage()
{
@gruessung
gruessung / DatabaseHelper.java
Created July 26, 2017 14:28
Android DatabaseHelper Class
package de.gvisions.solardorf.service;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
public class DatabaseHelper extends SQLiteOpenHelper {
private Context context;
@gruessung
gruessung / designer.html
Last active August 29, 2015 14:13
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../notification-elements/notification-alert.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">