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 / confirmEnding.js
Last active April 2, 2018 16:51
Check if a string ends with a given string target
/**
* Confirm endings
*
* Check if a string ends with a given target
*
* @param String string
* @param String target A target to match with the given string
*/
function confirmEnding(string, target) {
@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 / 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 / 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>
@19h47
19h47 / bufferscroll.md
Last active June 11, 2021 11:52
Install BufferScroll for Sublime Text directly from Github

Screenshot

I love when my folds are collapsed and I would like to save this state. So BufferScrool seems to do the job.

Before I start, I hope you use Package Control, it's very usefull when you working with Sublime Text.

BufferScroll

BufferScroll is a very cool package for Sublime Text, it saves your folds, cursor state and more.

@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 / 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 / COMMAND.md
Last active January 23, 2018 03:10
Command

cd

The cd command is used to change the current directory.

cd stand for change directory

cd path/of/directory