Skip to content

Instantly share code, notes, and snippets.

View f3l1x's full-sized avatar
:octocat:
hack for living

Milan Felix Šulc f3l1x

:octocat:
hack for living
View GitHub Profile
@f3l1x
f3l1x / README.md
Last active February 19, 2024 11:14
Cloudflare Terraform Permissions

Cloudflare Terraform

terraform {
  required_providers {
    cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "4.23.0"
    }
 }
@f3l1x
f3l1x / aliases
Last active January 29, 2024 19:21
Docker - installation, tips, commands, aliases
# ------------------------------------
# Docker alias and function
# ------------------------------------
# Get latest container ID
alias dl="docker ps -l -q"
# Get container process
alias dps="docker ps"
@f3l1x
f3l1x / postgres.sql
Last active May 26, 2022 08:23
SQL utils (Postgres / MySQL MariaDB)
select 'SELECT SETVAL(' || seq [ 1] || ', COALESCE(MAX('||column_name||')+1, 1) ) FROM '||table_name||';'
from (
SELECT table_name, column_name, column_default, regexp_match(column_default, '''.*''') as seq
from information_schema.columns
where column_default ilike 'nextval%'
) as sequense_query
@f3l1x
f3l1x / latte1.latte
Last active July 17, 2020 17:45
LESSIK - snippets
Hello from Latte!
Today is {time()|date:'d.m.Y'} and {date('H:i:s')}.
{var $members = ['dg', 'milo', 'f3l1x', 'chemix']}
{foreach $members as $member}
#{$iterator->counter} {$member}{sep},{/sep}
{/}
@f3l1x
f3l1x / keybase.md
Created December 20, 2016 15:11
KeyBase

Keybase proof

I hereby claim:

  • I am f3l1x on github.
  • I am f3l1x (https://keybase.io/f3l1x) on keybase.
  • I have a public key ASDrMeyL28xQU3dONwui-6Kkd4OUYn1Ukno8yuBe-ykhvgo

To claim this, I am signing this object:

@f3l1x
f3l1x / phpmailer
Last active May 16, 2016 11:45
PHPMAILER for dev server
#!/usr/bin/php
<?php
$input = file_get_contents('php://stdin');
preg_match('|^To: (.*)|', $input, $matches);
$filename = tempnam('/var/log/mail', $matches[1] . '.');
file_put_contents($filename, $input);