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 / UppercasefirstLetterString.js
Last active June 15, 2017 11:40
Return first letter for each word in a given string
/**
* First letter in uppercase of each word of a given string
*/
function UppercasefirstLetterString(str) {
var arr = str.toLowerCase().split(' ');
return arr.map( function(letter) {
return letter[0].toUpperCase() + letter.slice(1);
@19h47
19h47 / largestNumberOfArrays.js
Created June 15, 2017 13:03
Create an array with largest number from sub array
function largestNumberOfArrays(array) {
return array.map( function (subArray){
return subArray.reduce( function (previous, current) {
return (current > previous) ? current : previous;
});
@19h47
19h47 / load-more.js
Created June 15, 2017 21:28
Ajax loadmore module for WordPress and Timber
var $ = require('jquery');
var select = require('dom-select');
/**
* LoadMore
*/
function LoadMore(element) {
@19h47
19h47 / README.md
Last active August 12, 2017 14:46
Run Sublime Text 3 from terminal with the current sublime-project file loaded

Run Sublime Text with the sublime-project file loaded

The sublime-project is a file that contains all settings for a specific project. The file as to be loaded each time you relaunch Sublime Text.
To avoid that, we are going to launch Sublime Text from terminal with a parameter that is this sublime-project file name.

Set up Sublime Text CLI

Sublime Text bring a CLI tool subl, but we can't used the CLI tool as it is. To use it, we need to do a symbolic link.

Assuming you've placed Sublime Text in the applications folder

@19h47
19h47 / jekyll-and-liquid.md
Last active August 16, 2017 20:25 — forked from magicznyleszek/jekyll-and-liquid.md
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes:

@19h47
19h47 / 1PX-SOLID-BLACK.md
Last active September 1, 2017 09:17
Fun facts

1px solid black

To remind me the shorthand syntax of the border property, my technique was to think about Metal Gear Solid.

Because, 1px solid black is like Metal Gear Solid, isn't it? 😅

Find this article on dev.to

@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 / 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 / POCKET.md
Last active September 28, 2017 11:58
A collection of interesting post
@19h47
19h47 / color-variation.scss
Last active September 28, 2017 12:22
Color in Sass
/**
* Color variations
*
* Each colors used in the site.
*
* @uses the_color( $key, $value ) to retrieve color value
* @type nested map
* @see http://erskinedesign.com/blog/friendlier-colour-names-sass-maps/
* @see http://www.colorhexa.com/ to pickup color name
* @author Jérémy Levron <levronjeremy@19h47.fr>