Skip to content

Instantly share code, notes, and snippets.


  • @sublimetextpackages
Block or report user

Report or block SANGED

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Created Feb 28, 2019 — forked from heiswayi/
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
Created Feb 9, 2019 — forked from danmackinlay/
an init.d script for supervisord
#! /bin/sh
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
View [PHP] Simples amazing PHP fonctions
function InsertOrNot($BD){ // Permet de savoir si oui ou non, un truc a ete inserer dans la base de donnees ou pas!
$stmt = $BD->query("SELECT LAST_INSERT_ID()");
$lastId = $stmt->fetch(PDO::FETCH_NUM);
$lastId = $lastId[0];
echo "<center><i class=\"green\"><i class=\"fa fa-check\"></i> Op&eacute;ration &eacute;ffectu&eacute;e<i></center>";
echo "<center><i class=\"red\"><i class=\"fa fa-times\"></i>Erreur d&eacute;tect&eacute;e<i></center>";
SANGED / Multiple ReCaptcha on the same page Google normaly don't permit to do a multiple Recaptcha on the same page, so there is a way to sole this issue!
View Multiple ReCaptcha on the same page
require 'recaptchalib.php';
$siteKey = 'XXXXXXXXXXXXXXXXXXXXXX'; // votre clé publique
$secret = 'XXXXXXXXXXXXXXXXXXXXXX'; // votre clé privée
<div class="g-recaptcha" id="Optional-id"></div>
You can’t perform that action at this time.