Skip to content

Instantly share code, notes, and snippets.

View seflless's full-sized avatar

Francois Laberge seflless

View GitHub Profile
@seflless
seflless / logSVG.js
Last active July 16, 2022 13:45
Visually display an SVG element as an image in the dev tools console
function logSVG(svg){
// Get svg data
var xml = new XMLSerializer().serializeToString(svg);
// Make it base64
var svg64 = btoa(xml);
var b64Start = 'data:image/svg+xml;base64,';
// Prepend a "header"
var image64 = b64Start + svg64;
@seflless
seflless / useGesture.js
Created July 8, 2021 18:09
useGesture Example
import appActor from '../state/actors/app';
import { useGesture } from '@use-gesture/react'
import { useEffect, useRef } from "react"
import { getCamera } from "../cameras/usePanZoom";
export function usePanZoomEvents() {
const panZoomStartPositionInWorldSpace = useRef()
console.log("usepanzoom");
@seflless
seflless / test.js
Last active June 18, 2017 14:51
Medium Embedding Test
function test(){
const a = "a";
}

Expandable Markdown Sections

This markdown..

<p><details>
  <summary>
    <b>Expand for puppy</b>
    </summary>
    <img src="http://youthvoices.net/sites/default/files/image/129678/dec/1600dog_11019_1.jpg"/>
</details></p>

Elm has well thought out versioning rules. Because of Elm's strong type system their package manager could (can?) enforce the rules. They already have a CLI command to generate a report of what's changed between any two versions of a module.

For example, to compare changes between elm-lang/core's module 3.0.0 vs 4.0.0, run: elm-package diff elm-lang/core 3.0.0 4.0.0 which will produce:

Comparing elm-lang/core 3.0.0 to 4.0.0...
This is a MAJOR change.

------ Added modules - MINOR ------
// Regular commander.js logic up here. None of this
// logic is run if a subcommand match was found
var knownSubCommands = [
"blah",
"ha",
"etc"
]
@seflless
seflless / README.md
Created October 10, 2015 13:08 — forked from mbostock/.block
Streamgraph

For zontinuous data such as time series, a streamgraph can be used in place of stacked bars. This example also demonstrates path transitions to interpolate between different layouts. Streamgraph algorithm, colors, and data generation inspired by Byron and Wattenberg.

@seflless
seflless / atom-doc.json
Created May 15, 2015 15:35
HAR file for Atom.io Documentation Page Load Time Issues
{
"log": {
"version": "1.2",
"creator": {
"name": "WebInspector",
"version": "537.36"
},
"pages": [
{
"startedDateTime": "2015-05-15T15:31:28.141Z",
@seflless
seflless / Instructions.md
Last active August 29, 2015 14:15
Red5Pro Beta Issue

Steps to reproduce

  1. Install the Android app
  2. Open the app on your phone
  3. Select Second Screen
  4. Settings
  • Server: 162.242.210.105
  • Port: 8088
  • App Name: secondscreen
  1. Open the drawing app webpage
  2. Select Multi Draw from host list.
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">