Skip to content

Instantly share code, notes, and snippets.

View atsjj's full-sized avatar

Steve Jabour atsjj

View GitHub Profile
@atsjj
atsjj / index.js
Created September 16, 2020 00:16
p5js scene state
let currentScene = 1;
function setup() {
createCanvas(400, 400);
}
function mouseClicked() {
if (currentScene == 1) {
currentScene = 2;
} else {
@atsjj
atsjj / components.spinner\.js
Last active August 25, 2020 18:10
Spinner Component
import Component from '@glimmer/component';
import { action } from '@ember/object';
import { task, timeout } from 'ember-concurrency';
import { tracked } from '@glimmer/tracking';
export default class extends Component {
@tracked debounce = this.args.debounce || 0;
@tracked input = null;
@tracked value = this.args.value || 0;
@atsjj
atsjj / compact.hbs
Last active April 17, 2020 19:22
auto-changelog-templates
{{#each releases}}
{{#if @first}}
{{#each merges}}
* ({{id}}) {{{message}}}
{{/each}}
{{#each fixes}}
* {{{commit.subject}}}{{#each fixes}} ({{id}}){{/each}}
{{/each}}
{{#each commits}}
* ({{shorthash}}) {{#if breaking}}**Breaking change:** {{/if}}{{{subject}}}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Center text in SVG rect -- horz and vert</title>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1140 400">
<defs>
<style>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Center text in SVG rect -- horz and vert</title>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1140 400">
<defs>
<style>
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch File",
"protocol": "inspector",
"request": "launch",
@atsjj
atsjj / components.my-component.js
Created April 20, 2016 15:29
class-show-if-visible
import Ember from 'ember';
export default Ember.Component.extend({
classNameBindings: ['isVisible:show']
});
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
'ember-cli-foundation-sass': {
'modernizr': true,
'fastclick': true,
'foundationJs': 'all'
}
» ent halos.raw
Entropy = 7.428127 bits per byte.
Optimum compression would reduce the size
of this 376 byte file by 7 percent.
Chi square distribution for 376 samples is 254.47, and randomly
would exceed this value 49.76 percent of the times.
Arithmetic mean value of data bytes is 115.1941 (127.5 = random).
<!DOCTYPE html>
<meta charset="utf-8">
<canvas id='c'></canvas>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
var canvas = document.getElementById('c');
canvas.width = canvas.height = 465;
var context = canvas.getContext('2d');