Skip to content

Instantly share code, notes, and snippets.

@enricofoltran
enricofoltran / main.go
Last active Sep 16, 2021
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
View main.go
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@jwage
jwage / .php_cs
Last active Jul 5, 2021
php-cs-fixer git pre commit hook
View .php_cs
<?php
return Symfony\CS\Config\Config::create()
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
->fixers([
'short_array_syntax',
'ordered_use',
])
;
@jirutka
jirutka / pg_change_db_owner.sh
Last active Aug 27, 2021
Some convenient scripts to manage ownerships and privileges in PostgreSQL.
View pg_change_db_owner.sh
#!/bin/sh
#
# The MIT License
#
# Copyright 2014-2017 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active Sep 20, 2021
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)
View iterm2-solarized.md

Default

Default

Powerlevel10k

Powerlevel10k

@dryan
dryan / backup.py
Created Jan 22, 2014
Backup a MySQL database and/or a directory of files to S3.
View backup.py
#!/usr/bin/env python
import subprocess, sys, os, zipfile
try:
import boto
except ImportError:
print 'requires boto. `pip install boto`'
sys.exit(os.EX_UNAVAILABLE)
try: