Skip to content

Instantly share code, notes, and snippets.

View gscottolson's full-sized avatar

G. Scott Olson gscottolson

  • Microsoft
  • California
View GitHub Profile
@addisonschultz
addisonschultz / slideControls.tsx
Created February 18, 2020 10:05
An Override file that lets you control the Page component as a Slides component with arrow keys in Framer
import { Override, Data } from "framer"
import * as React from "react"
const slideData = Data({ currentSlide: 0 })
export function SlideControls(props): Override {
// This sets the slidesNumber dynamically from the Page component
const slidesNumber = React.Children.toArray(props.children)[0].props
.children.length
@rauchg
rauchg / effective-es6.md
Last active July 11, 2023 09:38
Writing ES6 today, effectively.

Effective transpiling of ES6

After publishing my article on ECMAScript 6, some have reached out to ask how I exactly I make it all work.

I refrained from including these details on the original post because they're subject to immiment obsoletion. These tools are changing and evolving quickly, and some of these instructions are likely to become outdated in the coming months or even weeks.

The main tool

When evaluating the available transpilers, I decided to use 6to5, which has recently been renamed to Babel. I chose it based on:

@davatron5000
davatron5000 / Sublime Text Setup.md
Last active April 15, 2023 15:39
A new user's guide to SublimeText 2. Estimated reading time: 2 mins. Estimated workthrough time: 12 minutes.

Make it useful

  • Install Package Control. For SublimeText 2, paste the following in Terminal:
import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( 'http://sublime.wbond.net/' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')

From here on out, use Package Control to install everything. +Shift+P, then type Install to get a list of installable packages you can 'livesearch through. After installing plugins, they should be running.

@aseemk
aseemk / 500.html
Created January 9, 2013 23:47
Thingdom's error and maintenance pages for Heroku. (Built with Jekyll and served by GitHub Pages.)
---
title: 500 Internal Server Error
---
<article>
<h1>500 Internal Server Error</h1>
<p>
Sorry, something’s gone wrong on our end.
We apologize for the inconvenience.
</p>
@ded
ded / domready.js
Created February 24, 2011 08:46
Smallest x-browser DOM Ready, ever
function r(f){/in/(document.readyState)?setTimeout(r,9,f):f()}