Skip to content

Instantly share code, notes, and snippets.

View notFloran's full-sized avatar

Floran Brutel notFloran

View GitHub Profile
@notFloran
notFloran / ovh_update_drupal.php
Created May 15, 2013 07:18
PHP Script to automate the update of drupal core on ovh shared hosting without ssh access
<?php
$hostBdd = "localhost";
$nameBdd = "";
$userBdd = "";
$passwordBdd = "";
$urlDrupal = "http://ftp.drupal.org/files/projects/drupal-7.21.zip";
function backupFiles() {
@notFloran
notFloran / neufbox_api.php
Created June 15, 2013 14:19
Connexion à l'API Neufbox
<?php
#Config
$apiUrl = "http://192.168.1.1/api/1.0/";
$user = "admin";
$password = "";
$tokenXML = simplexml_load_file( $apiUrl . "?method=auth.getToken" );
$token = $tokenXML->auth[0]->attributes()->token;
@notFloran
notFloran / reboot_nb6.sh
Last active March 29, 2024 09:22
Script pour redémarrer une Neufbox v6 Infos : NB6-SER-r2 NB6-MAIN-R3.2.12
#!/bin/bash
WEBLOGIN=admin
WEBPASS=
IP=192.168.1.1
wget -qO- http://$IP/login --referer="http://$IP/login?page_ref=/reboot" "http://$IP/reboot" --post-data="method=passwd&zsid=&login=$WEBLOGIN&password=$WEBPASS&submit=" &> /dev/null
@notFloran
notFloran / Homebrew.md
Last active December 23, 2015 04:39 — forked from alanivey/Homebrew.md
Correct command

Prerequisites

Xcode

Go to http://developer.apple.com/downloads, log in with your Apple ID (free) and download the newest version of either Command Line Tools (OS X Lion) for Xcode or Command Line Tools (OS X Mountain Lion) for Xcode. Run the installer in the dmg and you'll have the LLVM compiler, make, and other build tools.

XQuartz

Install XQuarts to satisfy a library dependency for PHP.

#!/usr/bin/php
<?php
/**
* .git/hooks/pre-commit
*
* This pre-commit hooks will check for PHP error (lint), and make sure the code
* is PSR compliant.
*
* Dependecy: PHP-CS-Fixer (https://github.com/fabpot/PHP-CS-Fixer)
*
@notFloran
notFloran / .gitconfig
Created January 21, 2014 20:22
Git : use http when ssh is blocked
[url "http://git.floran.fr/"]
insteadOf = [email protected]:
@notFloran
notFloran / php-amqp.sh
Last active March 26, 2016 21:00
Install amqp extension for php - Debian 7
#!/bin/sh
apt-get install php5-dev make cmake php-pear
git clone git://github.com/alanxz/rabbitmq-c.git && cd rabbitmq-c
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
cmake --build . --target install
@notFloran
notFloran / install.sh
Created August 12, 2014 15:14
Logstash-forwarder debian 7
wget -O - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | apt-key add -
echo 'deb http://packages.elasticsearch.org/logstashforwarder/debian stable main' > /etc/apt/sources.list.d/logstash-forwarder.list
app.factory('Authentication', function($http, $rootScope, $location, $timeout){
var Auth = {};
Auth.unsetUser = function() {
$rootScope.user = {};
};
Auth.setUser = function(data) {
$rootScope.user = data;
@notFloran
notFloran / create_server.php
Created April 29, 2015 19:29
PHP script to create a server on Runabove with php-opencloud
<?php
require 'vendor/autoload.php';
use OpenCloud\OpenStack;
use Guzzle\Http\Exception\BadResponseException;
$client = new OpenStack('https://auth.runabove.io/v2.0/', array(
'username' => '', // email
'password' => '',