Skip to content

Instantly share code, notes, and snippets.

View floweb's full-sized avatar

Florian Le Frioux floweb

  • Seldon Finance
  • Basusarri, Euskal Herria, France
View GitHub Profile
@floweb
floweb / 🎵 My Spotify Top Tracks
Last active August 7, 2024 16:09
spotify-box
Gans Media Retro Games Hot Mulligan
Wonder Cheese Xavier Dang
Shhhh! Golf is On Hot Mulligan
This Is Why Paramore
Shhhh! Golf is On Hot Mulligan
BCKYRD - Acoustic Hot Mulligan
Black Hole Be Your Own Pet
Heem Wasn't There Hot Mulligan
BCKYRD Hot Mulligan
À la renverse Intenable
@floweb
floweb / change_keycloak_export_realm_json_uuid.sh
Created June 11, 2020 08:13
change_keycloak_export_realm_json_uuid.sh
#!/bin/bash
grep "^ *\"id.*[0-9A-Fa-f]-" NewRealm-realm.json | cut -d'"' -f4 > myuuidfile
while read;
do
uuid=$(cat /proc/sys/kernel/random/uuid);
sed -i "s/$REPLY/$uuid/g" NewRealm-realm.json
done < myuuidfile
@floweb
floweb / .screenrc
Created May 11, 2020 12:49
.screenrc
# Turn off that annoying start up message
startup_message off
# Turn the even more annoying whole-screen-flash-on-tab-complete "feature"
vbell off
# I use control+a for beginning-of-line, this remaps it to the tick/tilda key
#escape ``
# Bind tick+e to show the tick character since tick+tick is too convenience to toggle windows
@floweb
floweb / pg_change_schema_owner.sh
Last active October 23, 2018 14:09 — forked from bspkrs/pg_change_schema_owner.sh
Changes the owner on all tables, sequences, views, and functions in a PostgreSQL database with support for identifiers with whitespace and non-public schemas.
#!/bin/bash
usage()
{
cat << EOF
usage: $0 options
This script sets ownership for all tables, sequences, views, and functions for a given schema.
Run this script as your postgres OS user.
@floweb
floweb / docker-compose.yml
Created December 6, 2017 11:24
MongoDB Docker Compose
version: "3"
services:
mongo:
image: mongo
restart: unless-stopped
environment:
- MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/dev/null
volumes:
@floweb
floweb / docker-compose.yml
Created December 5, 2017 17:37
mc compose
version: '2'
services:
mc:
ports:
- "25565:25565"
environment:
- EULA="TRUE"
- OPS=floweb
@floweb
floweb / react.html
Last active June 18, 2018 11:19 — forked from RickWong/react.html
Write React apps in 1 HTML file
<html>
<meta charset="utf-8" />
<body>
<div id="react-root"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react-with-addons.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.7.7/babel.min.js"></script>
<script id="react-app" type="text/template">
const App = ({name}) => {
@floweb
floweb / cyclos_api.py
Created February 2, 2017 08:35
API wrapper examples
import logging
from django.conf import settings
from rest_framework.exceptions import APIException
import requests
log = logging.getLogger()
class CyclosAPIException(APIException):
@floweb
floweb / docker-compose.yml
Last active July 19, 2016 08:34 — forked from puppybits/docker-compose.yml
sentry docker-compose
sentry-redis:
image: redis
sentry-postgres:
image: postgres
environment:
- POSTGRES_PASSWORD=sentry
- POSTGRES_USER=sentry
volumes:
- ./data/postgresql:/var/lib/postgresql/data
@floweb
floweb / force-ssl-url-scheme.php
Created October 19, 2015 13:35 — forked from webaware/force-ssl-url-scheme.php
For WordPress, force the protocol scheme to be HTTPS when is_ssl() doesn't work, e.g. on a load-balanced server where _SERVER['HTTPS'] and _SERVER['SERVER_PORT'] don't indicate that SSL is being used. See http://wordpress.org/support/topic/ssl-insecure-needs-35-compatibility for details.
<?php
/*
Plugin Name: Force SSL URL Scheme
Plugin URI: https://gist.github.com/webaware/4688802
Description: Force the protocol scheme to be HTTPS when is_ssl() doesn't work
Version: 1.0.0
Author: WebAware
Author URI: http://www.webaware.com.au/
@ref: http://wordpress.org/support/topic/ssl-insecure-needs-35-compatibility