Skip to content

Instantly share code, notes, and snippets.

@danielweck
danielweck / .eslintrc.js
Last active November 11, 2022 08:38
ESLint import resolver for ESM modules via package.json exports map
module.exports = {
settings: {
// optionally, if TypeScript project:
// 'import/parsers': {
// '@typescript-eslint/parser': ['.ts', '.tsx'],
// },
'import/resolver': {
// optionally, if TypeScript project:
// https://github.com/alexgorbatchev/eslint-import-resolver-typescript
// typescript: {
@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active June 7, 2024 20:53
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@brianmhunt
brianmhunt / .profile
Created April 12, 2016 16:01 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@bmhatfield
bmhatfield / .profile
Last active May 6, 2024 22:27
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else

This is the French translation of Manuel Rego's (@regocas) post "Deep Dive into Grid Layout Placement", published on February 1st, 2016. All images and code samples come from the original article, with the author's permission. Translation: Patrick Brosset (@patrickbrosset).

Ceci est la traduction française de l'article "Deep Dive into Grid Layout Placement" par Manuel Rego (@regocas), publié le 1er Février 2016. Toutes les images et extraits de code viennent de l'article original avec la permission de l'auteur. Traduction: Patrick Brosset (@patrickbrosset).

Le positionnement dans les Grilles CSS

Une revue complète des différentes méthodes de positionnement offertes par les grilles CSS.

@paulirish
paulirish / what-forces-layout.md
Last active June 8, 2024 13:18
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@andrewluetgers
andrewluetgers / gist:927fb8a8651d7a713365
Created February 5, 2015 16:38
Webpack + React + Stylus, Dev: Hotloat, Build: File Output
var webpack = require('webpack'),
path = require('path'),
ExtractTextPlugin = require("extract-text-webpack-plugin"),
isDev = process.env.NODE_ENV;
var config = {
cache: true,
resolve: {
extensions: ["", ".js", ".css", ".styl"]
@koistya
koistya / ReactJS-Server-Side-Rendering.md
Last active September 15, 2023 07:32
Server-side Rendering (SSR) for ReactJS / Flux Applications. Setting document.title

Files

The basic structure of a React+Flux application (see other examples)

 - /src/actions/AppActions.js     - Action creators (Flux)
 - /src/components/Application.js - The top-level React component
 - /src/constants/ActionTypes.js  - Action types (Flux)
 - /src/core/Dispatcher.js        - Dispatcher (Flux)
 - /src/stores/AppStore.js        - The main store (Flux)
@staltz
staltz / introrx.md
Last active June 7, 2024 23:39
The introduction to Reactive Programming you've been missing
@marchawkins
marchawkins / google-calendar-event-insert-js
Last active January 14, 2022 18:55
How to connect to the Google Calendar API via the Javascript Client Library and insert an event into a (https://www.google.com/calendar/embed?src=gk0pudanag1bhu35vkv5dunja4%40group.calendar.google.com&ctz=America/New_York). The demo also employs Oauth2 authentication, so the script could read and write to a logged in user's calendar.
<div class="row">
<div class="col-md-2 col-sm-2 col-xs-12">
<button id="authorize-button" style="visibility: hidden" class="btn btn-primary">Authorize</button>
</div><!-- .col -->
<div class="col-md-10 col-sm-10 col-xs-12">
<script type="text/javascript">
// date variables
var now = new Date();
today = now.toISOString();