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 / 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:
#
@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 / dopewars.rb
Created September 5, 2013 06:17
Homebrew Formula for Dopewars 1.5.12
require 'formula'
class Dopewars < Formula
homepage 'http://dopewars.sourceforge.net/'
url 'http://downloads.sourceforge.net/project/dopewars/dopewars/1.5.12/dopewars-1.5.12.tar.gz'
sha1 'ad46a38e225680e591b078eeec563d47b96684bc'
depends_on 'gettext' => :build
depends_on 'glib' => :build
depends_on 'gtk+' => :build
@atsjj
atsjj / .gitconfig
Last active December 17, 2015 20:19
My gitconfig
[user]
name = atsjj
email = atsjj@email.com
[core]
excludesfile = /Users/lname/.gitignore_global
[push]
default = current
[alias]
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit