Skip to content

Instantly share code, notes, and snippets.

View gabrielagabriel's full-sized avatar
🚴‍♀️
Riding a bike

Gabriela Gabriel gabrielagabriel

🚴‍♀️
Riding a bike
View GitHub Profile

Strings

String.prototype.*

None of the string methods modify this – they always return fresh strings.

  • charAt(pos: number): string ES1

    Returns the character at index pos, as a string (JavaScript does not have a datatype for characters). str[i] is equivalent to str.charAt(i) and more concise (caveat: may not work on old engines).

@tdd
tdd / learning-js.md
Created February 4, 2017 10:59
Learning JavaScript (ES3/ES5) • Quality resources
@tdd
tdd / Learning and exploring ES6.md
Last active November 10, 2020 09:01
Good resources to learn, discover and explore ES6 in-depth

Learning

  • ES6 Katas - Small, byte-size exercises to discover most aspects of ES6 features by doing interactive, online exercises. Pretty awesome.
  • Learn ES2015 - A great part of Babel's website that takes you through examples of all supported ES6+ features
  • ES6-Features.org - Nice ES6 / ES5 comparisons of many ES6 language features
  • ES6 Features - A single-page tour of code examples for just about every ES6 feature, by Luke Hoban

Exploring in-depth

  • ES6 In Depth - A great series of articles on Mozilla Developer Network (MDN); also available in French through great translation efforts.
@siamkreative
siamkreative / french-regions-departments.json
Last active November 26, 2021 02:31
Regions & Departments of France (JSON format). Régions et Départements de France (format JSON). Inspired from https://en.wikipedia.org/wiki/Regions_of_France & https://en.wikipedia.org/wiki/Departments_of_France
{
"regions": {
"alsace": [67, 68],
"aquitaine": [40, 47, 33, 24, 64],
"auvergne": [43, 3, 15, 63],
"basse-normandie": [14, 61, 50],
"bourgogne": [21, 58, 71, 89],
"bretagne": [29, 35, 22, 56],
"centre": [45, 37, 41, 28, 36, 18],
"champagne-ardenne": [10, 8, 52, 51],
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active May 6, 2024 12:29
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@ericelliott
ericelliott / essential-javascript-links.md
Last active April 22, 2024 10:15
Essential JavaScript Links
@staltz
staltz / introrx.md
Last active May 6, 2024 01:44
The introduction to Reactive Programming you've been missing
@okunishinishi
okunishinishi / Remove all git tags
Created March 8, 2014 03:12
Delete all git remote tags
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
@sindresorhus
sindresorhus / post-merge
Last active May 2, 2024 03:18
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"