Skip to content

Instantly share code, notes, and snippets.

@scottjehl
scottjehl / notes.md
Last active August 9, 2022 09:31
Notes from Wes Bos's talk on web tooling

Notes from @wesbos's talk:

Our frontend workflow is changing quickly and for good reasons. Tooling for tooling sake is a waste, but don't overlook the utility of modern dev tooling workflows - these are great, useful tools that are letting us improve our workflows in standards-based, forward-looking ways.

Trend: Frontend developers are moving to using package managers (npm) for client-side code (CSS and JS), much like we have been for managing our build tooling itself. I can attest to this being hugely helpful at Filament Group on client-side code, especially now that so many of our projects are on npm (https://www.npmjs.com/~filamentgroup ).

Yay, another talk that recommends loadCSS for performance. Nice to hear :)

Gulp tasks to use:

@jaredly
jaredly / App.re
Last active January 1, 2021 17:34
ReasonReact Context API Example
module StringContext =
Context.MakePair({
type t = string;
let defaultValue = "Awesome";
});
let component = ReasonReact.statelessComponent("Tree");
let make = _children => {
#
# Jekyll Generator for SCSS
#
# (File paths in this description relative to jekyll project root directory)
# Place this file in ./_plugins
# Place .scss files in ./_scss
# Compiles .scss files in ./_scss to .css files in whatever directory you indicated in your config
# Config file placed in ./_sass/config.rb
require 'compass'

Reason

I have heard a lot of complaints about lack of editor integration or flaky editor tooling in the Reason community. At my previous job we had ~3000 modules and ~80k LOC. I'll admit that we were not very vigilant with .rei files or keeping our inter module dependencies really clean so this slowed both bsb and especially reason-language-server down a lot.

In fact so much that people couldn't use reason-language-server anymore on 15" MacBook Pros.

I myself have always used a Merlin based setup since I joined the Reason eco system before reason-language-server, and in our project my setup had never failed. Therefor I went on a quest of setting up 3 of the major editors (Emacs, Vim and VSCode) and documenting how to get them working

@elnygren
elnygren / I18n.re
Last active January 16, 2020 15:48
Simple ReasonML i18n internationalization example with strong static typing and JS/TS support with GenType
/** Schema for translations, with @genType for TS/JS usage */
[@genType]
type translations = {
helloMessage: string,
helloMessageWithVariable: (~name: string) => string,
};
/** English translations */
[@genType]
let translationsEN = {
@nhunzaker
nhunzaker / Makefile
Last active February 7, 2019 04:13
Access LMU light sensor on Mac. Also includes the Emacs plugin I use for automatically updating my theme according to ambient light.
all:
gcc light.m -std=c99 -framework Foundation -framework IOKit -o light
clean:
rm -f light
@brampersandon
brampersandon / clean-react-native-app.sh
Last active January 7, 2019 15:43
A quick helper util for getting a misbehaving React Native environment back to normal.
alias clean-rn="watchman watch-del-all && rm -fr $TMPDIR/npm* && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && yarn cache clean && rm -rf ios/build && rm -rf ios/Pods && rm -rf android/.gradle && rm -rf android/.idea && rm -rf android/build && rm -rf android/app/build && rm -rf android/app/app.iml && yarn"
@Boldewyn
Boldewyn / git-get
Last active December 22, 2016 10:37
The `git get` command to replace `git pull` with a sophisticated rebase strategy
#!/bin/bash
#
# git get
#
# Place this script in your path, so that git(1) can find it. Presto!
# You can now type `git get` instead of `git pull` and enjoy the
# advantages of rebasing atop instead of merging remote changes.
#
# If you have local changes, use `git get --stash` to stash and
# pop afterwards your changes automatically.
const getAllPropertyNames = require('./get_all_property_names'),
Mutex = require('./mutex')
function actor(object) {
let methods = getAllPropertyNames(object),
mutex = new Mutex(),
wrapper = {}
for (let method of methods) {
if (typeof object[method] !== 'function') continue
@audionerd
audionerd / middleman_mustache.rb
Created March 13, 2012 02:24
Mustache support for Middleman
require 'tilt-mustache'
# Mustache Renderer
module Middleman::Renderers::Mustache
class << self
def registered(app)
# Mustache is not included in the default gems,
# but we'll support it if available.
begin