Skip to content

Instantly share code, notes, and snippets.

View atsjj's full-sized avatar

Steve Jabour atsjj

View GitHub Profile
@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']
});
@atsjj
atsjj / wedisagree-atsjj.zsh-theme
Last active January 19, 2017 16:37
My ZSH Theme, based on `wedisagree`.
# On a mac with snow leopard, for nicer terminal colours:
# - Install SIMBL: http://www.culater.net/software/SIMBL/SIMBL.php
# - Download'Terminal-Colours': http://bwaht.net/code/TerminalColours.bundle.zip
# - Place that bundle in ~/Library/Application\ Support/SIMBL/Plugins (create that folder if it doesn't exist)
# - Open Terminal preferences. Go to Settings -> Text -> More
# - Change default colours to your liking.
#
# Here are the colours from Textmate's Monokai theme:
#
{
// 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",
<!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>
@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}}}
@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 / 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 {