Skip to content

Instantly share code, notes, and snippets.

View joeyklee's full-sized avatar

Joey Lee joeyklee

View GitHub Profile
@cobyism
cobyism / gh-pages-deploy.md
Last active July 1, 2025 06:35
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@tmcw
tmcw / guide.md
Last active June 3, 2016 19:29
Whole Earth Guide

Whole Earth Guide

I'm not sure about this; GIS really got burned from being both a 'science' and a 'product' from the beginning, and there are blurry lines between what I think is essential and what I don't know because I never do it and am not a GIS person. Anyway.

A No-Bullshit Intro to Maps and GIS

  1. What Maps Are
  2. Data
  3. Information
  4. Transformation
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active May 30, 2025 22:04
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@dbreunig
dbreunig / ReporterSaveFileDescription.md
Last active January 22, 2021 16:07
A description of the data written to the Reporter App Dropbox save folder.

#Reporter Save File Schema

##The Reporter Export File

Reporter saves to your Dropbox account with plaintext JSON files, one for each day. When a Report is entered in the app a file is created for that day if it does not exist. Otherwise, the report is appended to the existing file. The save folder is located in 'Dropbox/Apps/Reporter-App/'.

Reporter save files are named according to the following convention:

YYYY-MM-DD-reporter-export.json
@auremoser
auremoser / nonmap.md
Last active April 19, 2020 03:57
NonMaps: OpenVis Conf 2016

This is Not a Map:

Building Interactive Maps with Creative Themes and Geometries

Aurelia Moser

The meaning of "map" across disciplines is remarkably varied. It's effectively a spatial representation of geo-topography, a linking between tables by foreign key, a datatype in C++... At CartoDB, users make creative use of our custom basemaps feature, building remarkable maps of multivariate information off-the-(beaten) geographic projection. Many have designed and published interactive maps of cemetery burial plots, galactic drawings of the Star Wars Universe, heatmaps of court traffic during the NBA finals. Let's explore other maps, and investigate topic and themes not yet covered in interactives...talk about how to map them, and why mapping unmapped data might be the perfect expression of their meaning.

Links:

@auremoser
auremoser / refs.md
Last active November 8, 2019 14:23

References

###5/3/16 11:30 AM Berlin

####Intro

@max-mapper
max-mapper / index.js
Created April 18, 2017 23:25
imessage sqlite export
// modified version of http://va2577.github.io/post/51/ to produce ndjson
const sqlite3 = require('sqlite3').verbose();
const db = new sqlite3.Database('../imessage.sqlite')
const Iconv = require('iconv').Iconv;
const sjis = new Iconv('UTF-8', 'Shift_JIS//TRANSLIT//IGNORE');
const filename = './sms.csv';
db.serialize(() => {
const sql = [];
@AlexCortinas
AlexCortinas / readme.md
Created April 9, 2019 16:20
Leaflet with parcel (or similar I guess)
import { Icon } from "leaflet"
delete Icon.Default.prototype._getIconUrl
Icon.Default.mergeOptions({
  iconRetinaUrl: require("leaflet/dist/images/marker-icon-2x.png"),
  iconUrl: require("leaflet/dist/images/marker-icon.png"),
  shadowUrl: require("leaflet/dist/images/marker-shadow.png")
})
@tmcw
tmcw / optimization.md
Last active February 14, 2021 14:38
Optimization

Optimization

Correctly prioritizing and targeting performance problems and optimization opportunities is one of the hardest things to master in programming. There are a lot of ways to do it wrong: by prematurely optimizing non-bottlenecks, or preferring fast solutions to clear solutions, or measuring problems incorrectly.

I'll try to summarize what I've learned about doing this right.

First, don't optimize until there's an issue. And issues should be defined as application issues: performance problems that are either detectable by the users (lag) or endanger the platform – i.e. problems that cause downtime, like out-of-memory issues. Until there's an issue, don't think about peformance at all: just solve the problem at hand, which is "creating value for the end-user," or some less-corporate translation of the same.

Second, only optimize with instruments. By instruments, I mean technology that lets you decipher which sub-part of the stack is the bottleneck. Let's say you see slowness around fet

@sindresorhus
sindresorhus / esm-package.md
Last active July 6, 2025 04:40
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.