Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View adamdicarlo's full-sized avatar

Adam DiCarlo adamdicarlo

View GitHub Profile
@wolfadex
wolfadex / elm-portal.js
Last active September 6, 2023 12:40
A Portal web component for Elm
window.customElements.define("elm-portal", class extends HTMLElement {
// Base custom element stuff
constructor() {
super();
this._targetNode = document.createElement('div');
}
connectedCallback() {
document.querySelector(this.getAttribute("data-target-selector")).appendChild(this._targetNode);
}
@Janiczek
Janiczek / elm-make-readable.mjs
Created April 15, 2022 19:46
elm-make-readable
import fs from 'fs/promises';
const rules = [
{
rule: /var ([^=]+)( = F\d\([^f]+function)[^(]\(/gmi,
replacement: `var $1$2 __$1( `,
},
{
rule: /(\sA\d\([\s]+)([^,]+)(,[\s]+)(function[^(]+)\(/gm,
replacement: `$1$2$3$4___$2(`,
},
@srdjan
srdjan / 100+ different counter apps...
Last active February 19, 2024 22:41
100+ different js counter apps...
100+ different js counter apps...
@tedpennings
tedpennings / routes.md
Last active April 6, 2020 18:28
A year of travel!

I spent six months traveling around the world with my partner Jen. It was one of the most fulfilling and exciting things I've ever done.

This document lists my route, December 2016 to May 2017.

Current status

I'm back in Portland, Oregon! I am so thankful for the opportunity to have spent six months traveling around the world while working remotely. It was one of the most fulfilling experiences of my life. I am back in Portland to stay and excited to call it home. I'm looking forward to re-establishing my yoga practice and getting in skydives toward by B license.

During my travels, I was able to visit thirteen countries: New Zealand, Australia, Indonesia, Taiwan, Malaysia, Thailand, India, Singapore, the United Arab Emirates, Egypt, Morocco, Spain and Canada. All but the last two were new experiences for me. Working while traveling permitted me to stay longer to get a feel for the local culture, and also gave me a feel for local life by requiring me to find wifi and cafes to work.

@necolas
necolas / Button.jsx
Last active November 4, 2015 00:05
CSS-in-JS to CSS
import React from 'react';
import styles from './styles.css.js';
class Button extends React.Component{
render() {
return (
<button className={styles.button}>
<span className={styles.icon} />
Button
</button>
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@hallettj
hallettj / tree-no_classes.js
Last active October 22, 2021 15:14
Algebraic data type in Javascript with Flow
/* @flow */
type Tree<T> =
| { type: "Node", value: T, left: Tree<T>, right: Tree<T> }
| { type: "EmptyTree" }
function find<T>(p: (v: T) => boolean, t: Tree<T>): T | void {
var l, v
if (t.type === "Node") {
@sockdrawermoney
sockdrawermoney / Legacy.txt
Last active March 23, 2017 15:47
"Legacy" as performed by Alana Henderson as Ros in Something Greater Than Artifice, the RealtimeConf production
## "Legacy" by Alana Henderson
[Listen to the MP3](https://cloudup.com/ctZJZshxYSY) or [watch the performance](https://vimeo.com/77273417)
__*leg·a·cy*__
1. *noun*: anything handed down from the past, as from an ancestor or predecessor
2. *adjective*: of or pertaining to old or outdated computer hardware, software, or data that, while still functional, does not work well with up-to-date systems
## Lyrics
@jvandyke
jvandyke / .gitconfig
Last active January 27, 2023 08:11
Use PHPStorm/WebStorm for git diff and merge tools
# ~/.gitconfig
# Add this to your global git configuration file
# Change phpstorm to webstorm, if you use that.
# Diff and merge tool changes
# Run `git difftool <directory/file>...` or `git mergetool <directory/file>...`
[merge]
tool = phpstorm
[diff]
tool = phpstorm
@agnoster
agnoster / README.md
Last active April 6, 2024 22:35
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark