Skip to content

Instantly share code, notes, and snippets.

View Depado's full-sized avatar
😁
Coding and Writing Posts

Depado

😁
Coding and Writing Posts
View GitHub Profile
@passivestar
passivestar / Editor.tres
Last active April 10, 2024 20:07
Godot editor theme
[gd_resource type="Theme" load_steps=12 format=3 uid="uid://7bvxnk5n5imx"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6h42l"]
content_margin_left = 10.5
content_margin_top = 8.75
content_margin_right = 10.5
content_margin_bottom = 8.75
bg_color = Color(0.117647, 0.117647, 0.117647, 1)
draw_center = false
border_color = Color(1, 1, 1, 0.137255)
@morph027
morph027 / Caddyfile
Created May 17, 2020 19:16
caddy2 ip filter
intranet.example.com {
@ipfilter {
not remote_ip 192.168.0.0/16
}
route @ipfilter {
# redirect
redir https://example.com/
# or respond
# respond "Access denied" 403 {
# close
// Processing code by Etienne JACOB
// motion blur template by beesandbombs
// result of this is more like tumblr version than twitter version (https://necessary-disorder.tumblr.com/image/190425356073)
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
@mholt
mholt / macapp.go
Last active April 8, 2024 17:54
Distribute your Go program (or any single binary) as a native macOS application
// Package main is a sample macOS-app-bundling program to demonstrate how to
// automate the process described in this tutorial:
//
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5
//
// Bundling the .app is the first thing it does, and creating the DMG is the
// second. Making the DMG is optional, and is only done if you provide
// the template DMG file, which you have to create beforehand.
//
// Example use:
@dopey
dopey / main.go
Last active May 8, 2024 09:54 — forked from denisbrodbeck/main.go
How to generate secure random strings in golang with crypto/rand.
package main
import (
"crypto/rand"
"encoding/base64"
"fmt"
"io"
"math/big"
)
@FiloSottile
FiloSottile / no-aaaa.py
Created June 25, 2017 21:10
Unbound python-script to route websites over IPv4.
def init(id, cfg):
return True
def deinit(id):
return True
def inform_super(id, qstate, superqstate, qdata):
return True
domains = [
@estahn
estahn / metabase.service
Last active January 30, 2023 14:25
Systemd file for Metabase
[Unit]
Description=Metabase server
After=syslog.target
After=network.target
[Service]
WorkingDirectory=/home/data/tools/metabase
ExecStart=/usr/bin/java -jar /home/data/tools/metabase/metabase.jar
Environment=MB_JETTY_PORT=8080
User=data
@cryzed
cryzed / fix-infinality.md
Last active May 8, 2024 17:00
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

package main
import (
"github.com/gin-gonic/contrib/sessions"
"github.com/gin-gonic/gin"
"log"
"net/http"
"strings"
)
@lukas-h
lukas-h / license-badges.md
Last active May 9, 2024 08:26
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)