Skip to content

Instantly share code, notes, and snippets.

View 19h47's full-sized avatar
🔥
This guy is on fire

Jérémy Levron 19h47

🔥
This guy is on fire
View GitHub Profile
@19h47
19h47 / GIT.md
Last active September 17, 2017 08:41
Git

add

This command updates the index using the content found in the working tree.

git add name/of/our/file

git-add

@19h47
19h47 / SVG.md
Last active September 13, 2017 07:19
SVG Path

Path

Each letters are commands followed by parameters, most of the time it's coordinates.

When the letter is uppercase it means that the coordinates are absolutes, when the letter is lowercase, it means that they are relatives.

Command Name Parameters
M or m moveto
C or c curveto
@19h47
19h47 / NPM.md
Last active January 22, 2019 16:45
npm commands

Uninstalling global package

npm uninstall -g name-of-package

npm uninstall

List global package

@19h47
19h47 / POCKET.md
Last active September 28, 2017 11:58
A collection of interesting post
@19h47
19h47 / Map.js
Last active November 3, 2017 09:49
Map class
// import $ from 'jquery';
/**
* Map
*/
class Map {
/**
* Map.constructor
*
@19h47
19h47 / Countdown.js
Created November 6, 2017 09:53
Countdown
/**
* Countdown
*
* @see https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_countdown
*/
class Countdown {
/**
* Countdown.constructor
*/
constructor() {
@19h47
19h47 / fonts.scss
Last active February 7, 2018 14:37
Fonts placeholder and utility classes
/**
* Font
*
* A map containing all information about fonts
*
* @type map
*/
$font: (
/**
@19h47
19h47 / Duration.js
Last active February 11, 2018 14:46
Okay JavaScript, you win. For now...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Document</title>
</head>
<body>
<div class="js-form-duration">
<label for="">
@19h47
19h47 / index.php
Created February 16, 2018 15:17
WordPress navigation
<?php
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
$args = array(
'post_type' => 'post',
'posts_per_page' => 12,
'post_status' => 'publish',
'paged' => $paged,
);
@19h47
19h47 / getMousePositions.js
Created May 23, 2018 11:05
Get mouse position
/**
* Get mouse position
*
* @param obj event
* @return obj { x, y }
* @see from http://www.quirksmode.org/js/events_properties.html#position
*/
export default function getMousePositions(event) {
let positionX = 0;
let positionY = 0;