Skip to content

Instantly share code, notes, and snippets.

@moux2003
moux2003 / createuser-db.sh
Last active September 19, 2016 09:27
createdb <database> <user> <password>
#!/bin/bash
EXPECTED_ARGS=3
E_BADARGS=65
MYSQL=`which mysql`
Q1="CREATE DATABASE IF NOT EXISTS $1;"
Q2="GRANT USAGE ON *.* TO $2@localhost IDENTIFIED BY '$3';"
Q3="GRANT ALL PRIVILEGES ON $1.* TO $2@localhost;"
Q4="FLUSH PRIVILEGES;"
@moux2003
moux2003 / hyperion.config.json
Created January 19, 2017 10:54
Hyperion config lightberry v1 46 LEDS
// Automatically generated configuration file for Hyperion ambilight daemon
// Notice: All values are explained with comments at our wiki: wiki.hyperion-project.org (config area)
// Generated by: HyperCon (The Hyperion deamon configuration file builder)
// Created with HyperCon V1.03.1 (11.06.2016)
{
// DEVICE CONFIGURATION
"device" :
{
"name" : "MyHyperionConfig",
@moux2003
moux2003 / menu_mobile.widget.dart
Created June 24, 2020 16:00
animation slide via AnimatedBuilder
class _Mobile extends StatelessWidget {
final Widget child;
_Mobile({this.child});
@override
Widget build(BuildContext context) {
double width = MediaQuery.of(context).size.width / 3;
int elapsed = 1;
return Center(
@moux2003
moux2003 / sh
Created April 28, 2021 07:39
Script clean des branches locales disparues en remote
git fetch -p && for branch in $(git branch -vv | grep ': disparue]' | awk '{print $1}'); do git branch -D $branch; done
@moux2003
moux2003 / AutoMockable.stencil
Created June 13, 2024 13:18
Sourcery AutoMockable template
// swiftlint:disable line_length
// swiftlint:disable variable_name
import Foundation
#if os(iOS) || os(tvOS) || os(watchOS)
import UIKit
#elseif os(OSX)
import AppKit
#endif