Skip to content

Instantly share code, notes, and snippets.

View dayio's full-sized avatar
🎺
Doot Doot

Alex dayio

🎺
Doot Doot
View GitHub Profile
@dayio
dayio / Configure Keycloak Laravel
Created June 7, 2016 05:19
A way to use Keycloak as provider for login into laravel
This gist is created because the library i use eloquent-oauth-l5 has a pull-request (custom providers feature ) awaiting a merge
So here my way to use this feature and use keycloak as custom provider.
Inside composer.json
"repositories": [
{
"type": "vcs",
"url": "https://github.com/tysonlt/eloquent-oauth-l5"
}
@dayio
dayio / handler.js
Last active February 8, 2016 20:47
/*!
* OS.js - JavaScript Cloud/Web Desktop Platform
*
* Mysql Handler: Login screen and session/settings handling via database
* PLEASE NOTE THAT THIS AN EXAMPLE ONLY, AND SHOUD BE MODIFIED BEFORE USAGE
*
* Copyright (c) 2011-2016, Anders Evenrud <andersevenrud@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
<?php
/*!
* OS.js - JavaScript Operating System
*
* Mysql Handler: Login screen and session/settings handling via database
* PLEASE NOTE THAT THIS AN EXAMPLE ONLY, AND SHOUD BE MODIFIED BEFORE USAGE
*
* Copyright (c) 2011-2016, Anders Evenrud <andersevenrud@gmail.com>
* All rights reserved.
*
build_settings:
mysql:
host: 'localhost'
user: '-----'
pass: '-----'
setup:
mysql:
- "DROP DATABASE IF EXISTS -----;"
- "CREATE DATABASE -----;"
/*!
* OS.js - JavaScript Cloud/Web Desktop Platform
*
* Mysql Handler: Login screen and session/settings handling via database
* PLEASE NOTE THAT THIS AN EXAMPLE ONLY, AND SHOUD BE MODIFIED BEFORE USAGE
*
* Copyright (c) 2011-2016, Anders Evenrud <andersevenrud@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#!/bin/bash
echo '#################################'
echo '# #'
echo '# FAIL2BAN INSTALL #'
echo '# #'
echo '#################################'
echo ''
apt-get install fail2ban
service fail2ban stop
#!/bin/bash
echo '#################################'
echo '# #'
echo '# FIREWALL CONFIGURATION #'
echo '# #'
echo '#################################'
echo ''
cat > /etc/iptables.firewall.rules << EOL
#!/bin/bash
SAMBATOOL=/usr/local/samba/bin/samba-tool
USER=admin
PASSWORD="PASSWORD"
HOST="DNS-SERV.TEST.LOCAL"
DOMAIN
For each new VM
create virtual mac and add it to physical properties in network-device
under E100
then add this lines to /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
@dayio
dayio / code.asm
Last active October 9, 2015 07:54
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; VARIABLES GLOBALES ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
breed [capteurs capteur]
breed [habitants habitant]
breed [batiments batiment]
breed [capteursTemperature capteurTemperature]
breed [capteursPresence capteurPresence]
breed [radiators rad]