Skip to content

Instantly share code, notes, and snippets.

View nrigaudiere's full-sized avatar
🤘
Rocking in a free world

Nicolas Rigaudière nrigaudiere

🤘
Rocking in a free world
View GitHub Profile
@nrigaudiere
nrigaudiere / .gitlab-ci.yml
Created May 11, 2018 13:57 — forked from thornbill/.gitlab-ci.yml
Example Node GitLab CI Yamlfile
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image: node:6
before_script:
- npm install
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})

Formatting

spaces vs. tabs

Use only tabs for indentation. Do not use spaces. Yes, spaces would be better :), it's for historical reasons.

curly braces, control flow

  • Always put opening curly braces on new line.
  • Add a space after control flow keywords.
  • Use braces for single line ifs as well

Formatting

spaces vs. tabs

Use only tabs for indentation. Do not use spaces. Yes, spaces would be better :), it's for historical reasons.

curly braces, control flow

  • Always put opening curly braces on new line.
  • Add a space after control flow keywords.
  • Use braces for single line ifs as well
/*
https://webapps.stackexchange.com/questions/100820/how-do-i-invite-all-team-members-to-a-new-slack-channel#answer-104062
Instructions: Just browse to the appropriate channel and paste
this script (below) into your Chrome/Firefox dev console and hit enter.
Then wait for the script to run until it completes.
It might take time as there is a limit to how many users may be invited at once.
The script will loop until all team members are invited.
*/
var foundAny=false;
function selectAllByLetter(remainingLetters) {
@nrigaudiere
nrigaudiere / gitcheats.txt
Created October 20, 2017 13:10 — forked from chrismccoy/gitcheats.txt
git cheats
# shortform git commands
alias g='git'
# get a list of all commit messages for a repo
git log --pretty=format:'%s'
# push changes to an empty git repository for the first time
git push --set-upstream origin master
# Remove + and - from start of diff lines
@nrigaudiere
nrigaudiere / rfc-yarn-workspaces.md
Created October 20, 2017 08:25 — forked from jamiebuilds/rfc-yarn-workspaces.md
[RFC] Yarn Workspaces
  • Start Date: (fill me in with today's date, YYYY-MM-DD)
  • RFC PR: (leave this empty)
  • Yarn Issue: (leave this empty)

Summary

Workspaces adds support for managing multiple packages within a single Yarn project. Linking between them on install to make cross-development simpler.

Motivation

@nrigaudiere
nrigaudiere / SCSS.md
Created July 16, 2017 10:37 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@nrigaudiere
nrigaudiere / install-redis.sh
Created June 6, 2017 08:30 — forked from dstroot/install-redis.sh
Install Redis on Amazon EC2 AMI
#!/bin/bash
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
###############################################
# To use:
# wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh
# chmod 777 install-redis.sh
# ./install-redis.sh
###############################################
echo "*****************************************"