Skip to content

Instantly share code, notes, and snippets.

View paceaux's full-sized avatar
🌐
Obsessing with languagey things

Paceaux paceaux

🌐
Obsessing with languagey things
View GitHub Profile
@paceaux
paceaux / SearchMap.js
Last active June 5, 2020 16:32
SearchMap: A JavaScript Map with searchable keys
/** Evaluates an array, makes the key lowercasee and makes the value an object with original keyname
* @param {Array} iterable=[] an array of arrays:[[key,val],[key,val]]
* @returns Array
*/
function LowercaseIterable(iterable = []) {
if (iterable.length === 0) return [];
const newIterable = iterable.map(([key, val]) => {
const entry = [
key.toLowerCase(),
@paceaux
paceaux / speaker.js
Created September 3, 2019 17:16
Interface for speech synthesis in the browser
/**
* @typedef SpeakerDefaults
* @type {object}
* @property {string} voiceURI voice that the browser uses
* @property {Number} volume loudness. Between 0 and 1.0
* @property {Number} rate speed at which words are spoken. Between 0 and 2.
* @property {Number} pitch Between 0 and 2
* @property {string} lang ISO language
*/
@paceaux
paceaux / jira-dark.css
Last active May 22, 2019 18:26
Dark mode for Jira
body {
--bgColor: #111;
--textColor:rgb(201, 208, 221) ;
--infoColor: rgba(201, 208, 221, .7) ;
--titleColor: rgb(133,153,187);
--linkColor: rgb(57,114,198);
--buttonBGColor: #444547;
--buttonColor: rgb(201,228,221);
--buttonBGColorHover: #72829e;
--itemBGColor: #272524;

Scss Style Guide Starter

Special thanks to Carwin Young (Github @carwin) whose docs this is based on

This is a guide for formatting Sass stylesheets, it's goals are:

  • To encourage consistency between developers in a repository.
  • Styles applying to an element should be in one place
  • Code should be easily find-able and legible by humans
  • Classes are mostly explicitly named (pointing to specific elements, not functionality)
@paceaux
paceaux / tinyRules.css.md
Last active April 3, 2024 01:19
Tiny rules for how to name things in CSS and JS

Tiny rules for how to name stuff

CSS

How to name CSS classes

Stateful Class names

Is it a state that is only one of two conditions? (i.e. a boolean)

@paceaux
paceaux / cleaner.py
Created April 18, 2017 22:20
Cleaner: get rid of old files in a directory
# Shamelessly stolen from https://www.quora.com/As-a-programmer-what-tasks-have-you-automated-to-make-your-everyday-life-easier/answer/Cory-Engdahl?srid=tVE5
#
# Usage:
# python cleaner.py -f [full/path/to/folder]
# arguments
# -p, --path : fully qualified path to folder (required)
# -d, --days : Age in days of the file to delete (optional, default is 1 day)
# -e, --exclude: name of files to save (optional)
# -i, --include: name of files to delete regardless of timeframe (optional)
@jhorsman
jhorsman / SDL Tridion versions
Last active May 29, 2020 08:47
SDL Tridion versions and release dates
Release 1 (1996)
Release 2 (1997)
Release 3 (1999)
Release 4 (2001)
Release 5 (2003)
Tridion 5.1 (2005)
Tridion 5.2 (2006)
SDL Tridion 5.3 (January 2008)
SDL Tridion 2009 (November 2009)
SDL Tridion 2011 (Januari 2011)
@paceaux
paceaux / speaker.js
Last active August 29, 2015 13:55
Speech Synthesis JS API
speech = function (msg, options, onend) {
this.text = msg;
this._defaults = {
voiceURI: 'native',
volume: 3,
rate: 2,
pitch: 1.5,
lang: 'en-US'
};
this.defaults = options !== undefined ? options : this._defaults;
@paceaux
paceaux / cssom.js
Last active December 26, 2015 13:29
Stylesheet toggler. Uses the CSSOM (Cascading StyleSheet Object Model). Drop this somewhere on your page and it'll find your stylesheets and let you turn them on and off.
window.cssom = {
init: function () {
var _this = window.cssom;
_this.functions.bootstrapTable();
},
data: {
table: {},
rootClass: "CSSOM",
tableClass: "table",
rowButton: {