Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Jonathan Grafikart

🏠
Working from home
Block or report user

Report or block Grafikart

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
@Grafikart
Grafikart / DOMAnimation.js
Last active Jul 9, 2019
Permet d'animer des éléments HTML
View DOMAnimation.js
class DOMAnimations {
/**
* Masque un élément avec un effet de repli
* @param {HTMLElement} element
* @param {Number} duration
* @returns {Promise<boolean>}
*/
static slideUp (element, duration = 500) {
return new Promise(function (resolve, reject) {
element.style.height = element.offsetHeight + 'px'
View handbrake.json
{
"PresetList": [
{
"AudioCopyMask": [
"copy:aac",
"copy:ac3",
"copy:dtshd",
"copy:dts",
"copy:mp3",
"copy:truehd",
@Grafikart
Grafikart / AppCitiesCommand.php
Created May 2, 2017
Import des villes depuis EUCircos
View AppCitiesCommand.php
<?php
namespace AppBundle\Command;
use AppBundle\Entity\Departement;
use AppBundle\Entity\Region;
use AppBundle\Entity\Ville;
use Doctrine\ORM\EntityManager;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
View .spacevim
" Use exclude option if you don't want the full Layer,
" e.g., Layer 'better-defaults', { 'exclude': 'itchyny/vim-cursorword' }
function! Layers()
" Default layers, recommended!
Layer 'fzf'
Layer 'unite'
Layer 'airline'
Layer 'better-defaults'
Layer 'syntax-checking'
@Grafikart
Grafikart / startup.sh
Last active Apr 3, 2017
Basic Server
View startup.sh
#!/bin/bash
###
# Ce fichier sert à construire un serveur de test (pour les tutoriels) rapidement
# NE PAS UTILISER EN PROD !
###
# Variables
export DEBIAN_FRONTEND=noninteractive
@Grafikart
Grafikart / backup.sh
Created Jul 7, 2015
Backup.sh (ruby)
View backup.sh
#!/usr/bin/env ruby
require 'date'
servers = {
"hostname" => "directory_name",
"hostname" => "directory_name",
"hostname" => "directory_name",
"hostname" => "directory_name",
"hostname" => "directory_name"
}
@Grafikart
Grafikart / gist:a753044d9bfaf622b257
Created Apr 22, 2015
Envoy.blade.php pour CakePHP
View gist:a753044d9bfaf622b257
@servers(['web' => 'tuto@localhost'])
@setup
$dir = "/home/tuto";
$dirlinks = ['tmp/cache/models', 'tmp/cache/persistent', 'tmp/cache/views', 'tmp/sessions', 'tests', 'logs'];
$filelinks = ['config/app.php'];
$releases = 3;
$remote = false;
$shared = $dir . '/shared';
@Grafikart
Grafikart / sendmail.mc
Created Jan 1, 2015
/etc/mail/sendmail.mc pour Free.fr
View sendmail.mc
define(`SMART_HOST',`smtp.free.fr')
GENERICS_DOMAIN(localhost.localdomain localhost)dnl
FEATURE(`genericstable')dnl
MASQUERADE_AS(`free.fr')dnl
FEATURE(masquerade_envelope)dnl
View nginxX
server {
listen 80;
server_name homestead.app;
root /home/vagrant/Code/Laravel/public;
index index.html index.htm index.php;
charset utf-8;
location / {
View cmd.sh
# Check if hack3d !
find . -type f -name "*.php" | xargs grep -P "<\?php.*/epreg_replace.*?\?>" --color
find . -type f -name "*.php" | xargs grep -P "<\?php.*/eval\(.*?\?>" --color
# REPLACE ALL THE BAD CODE !!
find . -type f -name "*.php" | xargs perl -pi -e "s|<\?php.*/epreg_replace.*?\?>||g"
find . -type f -name "*.php" | xargs perl -pi -e "s|<\?php.*/eval\( base64.*?\?>||g"
You can’t perform that action at this time.