Skip to content

Instantly share code, notes, and snippets.

View nesk's full-sized avatar

Johann Pardanaud nesk

View GitHub Profile
@nesk
nesk / Handler.php
Created January 16, 2018 10:39
Laravel default error page (1/2)
<?php
/**
* Render the given HttpException.
*
* @param \Symfony\Component\HttpKernel\Exception\HttpException $e
* @return \Symfony\Component\HttpFoundation\Response
*/
protected function renderHttpException(HttpException $e)
{
@nesk
nesk / index.html
Created April 8, 2017 14:00
Initializing Smooch makes some icons disappear
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://cdn.smooch.io/smooch.min.js"></script>
<style>
@nesk
nesk / unicode-interpretation.js
Created June 10, 2016 14:43
Interpreting Unicode values and writing them to a string to render the corresponding Emoji
// Based on this amazing article:
// http://crocodillon.com/blog/parsing-emoji-unicode-in-javascript
function findSurrogatePair(point) {
var offset = point - 0x10000,
lead = 0xd800 + (offset >> 10),
trail = 0xdc00 + (offset & 0x3ff);
return [lead.toString(16), trail.toString(16)];
}
@nesk
nesk / LICENSE.txt
Created June 17, 2011 13:31 — forked from 140bytes/LICENSE.txt
Detect CSS 3 transitions support
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Johann PARDANAUD : http://plune.fr
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@nesk
nesk / LICENSE.txt
Created May 30, 2011 06:48 — forked from 140bytes/LICENSE.txt
Get ready to go epileptic !
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Johann PARDANAUD : http://plune.fr
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE