Disable Bouncing Dock Icons
defaults write com.apple.dock no-bouncing -bool TRUE;
I have never liked those bouncing icons in osx…
defaults write com.apple.dock no-bouncing -bool TRUE;
I have never liked those bouncing icons in osx…
main:{
header:{
{'Tasker'}
newCol:{'New Column'}
}columns:{
scroll:{
NoteCols:{}
} }}NoteCol:{
title:{['editable', 'focus']
close:{
{'×'}
} }newNote:{['editable', 'placeholder="New Note..."']}
hr:{}
noteContainer:{
Notes:{}
}}Note:{['focus']
close:{
{'×'}
}checkbox:{}
content:{['edtiable']}
}console.log('no errors :D');
The above is actually valid javascript, just a bunch of labels, blocks and a few arrays
canvas = document.querySelector "canvas"
c = canvas.getContext "2d"
locX = 120
locY = 400
xn1 = xn = yn1 = yn = tn = 0
u = .7steps = 10
iterations = 200
scale = 180
c.fillStyle = "black"
c.fillRect 0, 0, canvas.width, canvas.height
c.fillStyle = "rgba(255,255,255,0.2)"
run = setInterval ->
clearInterval run if u > 1
i = 0
while i < stepsu += 0.00015
j = 0
while j < iterations xn = xn1 yn = yn1tn = 0.4 - (6 / (1 + xn * xn + yn * yn))
xn1 = 1 + u * (xn * Math.cos(tn) - yn * Math.sin tn)
yn1 = u * (xn * Math.sin(tn) + yn * Math.cos tn)
c.fillRect locX + xn1 * scale, locY + yn1 * scale, 1, 1
j++ i++, 30
I do quite miss CoffeeScript sometimes… here is an old codepen of the Ikeda Map:
See the Pen Ikeda Map by Zevan Rosser (@ZevanRosser) on CodePen.
<div class="toggle">
<input class="check" type="checkbox" tabindex="0">
<label></label>
</div>
<style>
.toggle {
position: relative;
}.check {
position: absolute;
width: 3rem;
height: 3rem;
margin: 0;
opacity: 0;
cursor: pointer;
} label {position: absolute;
pointer-events: none;
content: '';
width: 3rem;
height: 3rem;
background: black;
cursor: pointer }.check:checked + label {
background: red;
}</style>
Quick css checkbox. I used to do this all the time and feel like maybe there was a better way… anyway, this is what I did to get it working fast…
// Minimum length of Soundex keys.var minLength = 4
// Soundex values belonging to characters.// This map also includes vowels (with a value of 0) to easily distinguish// between an unknown value or a vowel.var map = {}
map.a = map.e = map.i = map.o = map.u = map.y = 0
map.b = map.f = map.p = map.v = 1
map.c = map.g = map.j = map.k = map.q = map.s = map.x = map.z = 2
map.d = map.t = 3
map.l = 4
map.m = map.n = 5
map.r = 6
/** * Get the soundex key from a given value. * * @param {string} value * @param {number} [maxLength=4] * @returns {string} */function soundex(value, maxLength) {
var lowercase = String(value).toLowerCase()
/** @type {Array.<string|number>} */var results = []
var index = -1
/** @type {string} */ var character /** @type {number} */ var previous /** @type {number} */ var phoneticswhile (++index < lowercase.length) {
character = lowercase.charAt(index)
phonetics = map[character]
if (index === 0) {
// Initial letterresults.push(character.toUpperCase())
} else if (phonetics && phonetics !== previous) {
// Phonetics valueresults.push(phonetics)
} else if (phonetics === 0) {
// Vowelphonetics = null
} else {
// Unknown character (including H and W) phonetics = previous } previous = phonetics }return pad(results.join('')).slice(0, maxLength || minLength)
}/** * Pad a given value with zero characters. The function only pads four characters. * * @param {string} value * @returns {string} */function pad(value) {
var length = minLength - value.length
var index = -1
while (++index < length) {
value += '0'
} return value}console.log(
soundex('Joe'),
soundex('Smith'),
soundex('Ed'),
soundex('Vilowat')
)Was talking with someone about Soundex… I grabbed this implementation from the soundex-code npm package from Titus Wormer…
Soundex has always been super interesting to me for some reason.