Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Arthur Monney mckenziearts

🏠
Working from home
Block or report user

Report or block mckenziearts

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@1natsu172
1natsu172 / .eslintrc
Last active Jan 14, 2020
My airbnb based ESLint config for "typescript-eslint" with React & prettier
View .eslintrc
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"tsconfigRootDir": "."
},
"env": {
"browser": true,
"jest/globals": true
},
@whoisryosuke
whoisryosuke / gist:5b0d54926c997a6620945d780958ea74
Created Sep 29, 2018
Javascript / ES6 - Uppercase first letter of each word (2 ways) -- via: https://stackoverflow.com/a/4878800
View gist:5b0d54926c997a6620945d780958ea74
function toTitleCase(str) {
return str.replace(/\w\S*/g, function(txt){
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
});
}
// or in ES6:
var text = "foo bar loo zoo moo";
const ucfirst = text => text.toLowerCase()
@azdanov
azdanov / eslint-flow-create-react-app.md
Last active Dec 8, 2019
Using ESlint + Flow + Create React App
View eslint-flow-create-react-app.md

ESLint + Flow + Create React App

.eslintrc

{
  "parser": "babel-eslint",
  "extends": [
    "airbnb",
    "prettier",
    "prettier/react",
View gist:a98e9368dbe1dcbfce7198c16b862c92
Name: Flash
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc=
if anyone wants to thank ETH: 0x527c2aB55b744D6167dc981576318af96ed26676
Thank you!
View PSR-2-coding-style-guide-french
Guide du style de code
Ce guide étend et agrandit le PSR-1, le standard basique de codage
Le but de ce guide est de réduire la complexité de lecture du code d'auteurs différents. Il le fait en listant un ensemble de règles et d'explication à propos du format du code PHP.
Les règles de styles sont issues de points communs entre les différents membre du projet. Quans plusieurs auteurs collaborents ensemble sur différents projets, la mise en place de bonnes pratiques est une aide. Cependant, les avantages de ce guide ne sont pas les règles en elle-mêmes, mais le fait de partager ces règles.
Les mots clés "DOIT", "NE DOIT PAS", "REQUIS", "DEVRAIT", "NE DEVRAIT PAS", "RECOMMANDE", "POURAIT", "OPTIONNEL", dans ce document doivent être interprétés comme décrit dans la RFC 2119.
@cecilemuller
cecilemuller / letsencrypt_2019.md
Last active Jan 18, 2020
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)
View letsencrypt_2019.md

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@rxaviers
rxaviers / gist:7360908
Last active Jan 20, 2020
Complete list of github markdown emoji markup
View gist:7360908

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@djaiss
djaiss / gist:2938259
Created Jun 15, 2012
PHP List of countries
View gist:2938259
<?php
$countries =
array(
"AF" => "Afghanistan",
"AL" => "Albania",
"DZ" => "Algeria",
"AS" => "American Samoa",
"AD" => "Andorra",
"AO" => "Angola",
View slugify.js
function slugify(text)
{
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
}
@nickfloyd
nickfloyd / create_branch_from_tag
Created Jan 27, 2011
To create a branch from a tag
View create_branch_from_tag
-Go to the starting point of the project
>> git checkout origin master
-fetch all objects
>> git fetch origin
-Make the branch from the tag
>> git branch new_branch tag_name
-Checkout the branch
>> git checkout new_branch
-Push the branch up
>> git push origin new_branch
You can’t perform that action at this time.