Skip to content

Instantly share code, notes, and snippets.

View YannPl's full-sized avatar
:octocat:

Yann Plantevin YannPl

:octocat:
View GitHub Profile
@YannPl
YannPl / History|-136c286c|entries.json
Created May 25, 2022 18:53
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"vscode-userdata:/home/yann/.config/Code/User/snippets/typescript.json","entries":[{"id":"j9kD.json","timestamp":1651667722715},{"id":"oo5b.json","timestamp":1651668579121}]}
@YannPl
YannPl / gist:b7367db5c661951d8cee
Last active August 29, 2015 14:27 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@YannPl
YannPl / js_type_check.js
Last active August 29, 2015 14:10
Type check in JavaScript
typeof []; // object
typeof {}; // object
typeof ''; // string
typeof new Date() // object
typeof 1; // number
typeof function () {}; // function
typeof /test/i; // object
typeof true; // boolean
typeof null; // object
typeof undefined; // undefined
@YannPl
YannPl / _ide_helper.php
Last active August 29, 2015 14:09 — forked from barryvdh/_ide_helper.php
Permet d'activer l'autocompletion et l'aide à la saisie pour la façade laravel dans les IDE
<?php
/**
* An helper file for Laravel 4, to provide autocomplete information to your IDE
* Generated for Laravel 4.2.8 on 2014-08-26.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
@YannPl
YannPl / gulpfile-browserify.js
Created November 11, 2014 10:18
Gulp Browserify task for multiple entry points and multiple output points
// GULP REQUIREMENT
var gulp = require('gulp');
var gutil = require('gulp-util');
// PLUGINS REQUIREMENTS
var changed = require('gulp-changed');
var notify = require('gulp-notify');
var uglify = require('gulp-uglify');
var browserify = require('browserify');
var transform = require('vinyl-transform');
@YannPl
YannPl / Reg_Exp_Cheat_Sheet.md
Last active August 29, 2015 14:08
Memo for developers using regular expressions

Metacharacters Defined

  • ^ Start of a string.
  • $ End of a string.
  • . Any character (except \n newline)
  • | Alternation.
  • {...} Explicit quantifier notation.
  • [...] Explicit set of characters to match.
  • (...) Logical grouping of part of an expression.
  • * 0 or more of previous expression.
@YannPl
YannPl / hackAutoInviteFacebook.js
Last active August 29, 2015 14:08
Facebook Hack Invite Button
/*********************************************************
* **** STEP 1 : Include jQuery **************************
* ******************************************************/
/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor()