macOS Sequential Copy Paste pbcopy pbpaste shell script
Start it and copy some things, then press Ctrl+c and you get a list of all things you copied.
~/.bin/sequential-paste-recording
#!/usr/bin/env bash
list=()
last=""
Start it and copy some things, then press Ctrl+c and you get a list of all things you copied.
~/.bin/sequential-paste-recording
#!/usr/bin/env bash
list=()
last=""
is a really cool pixel art pack by almostApixel that you can find on itch.io.
I was playing around with the folder of images and started building a little demo that generates a random character in a random state, with random skin, random hair etc.
But then I noticed that some images didn't load. The file paths I were relying on weren't consistent. If I for example randomized an adult character with a dark brown ponytail, then the image wouldn't work
If you have written an AppleScript before, you might have felt the same way as I did,
that it was a poor experience to use the Script Editor app, it's barely better than
writing the script in any text editor or in a heredoc to run using osascript
.
Luckily you could try the JXA variant instead, AppleScript using Javascript. But writing such a file in the Script Editor app is not a better experience sadly.
https://iterm2.com/documentation-dynamic-profiles.html
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
// Example usage
// 1. Create two nice profiles in iTerm
I like writing well-formed git commits that explain the intention behind why a code change was made.
Check out Chris Beams excellent How to Write a Git Commit Message if you haven't read it.
Anyway, for a project I've been working on I've gathered up 900+ commits that hold up a pretty high quality (except for one
You may have read the following excellent blogpost by Brian Helmkamp of CodeClimate. It nicely describes 7 types of objects that can be extracted from models and controllers in a Rails-app.
7 Patterns to Refactor Fat ActiveRecord Models https://codeclimate.com/blog/7-ways-to-decompose-fat-activerecord-models/ Brian Helmkamp on Oct 17, 2012.
Here are my thoughts on it, reading it as an experienced rails developer, 7 years later
Great if you're using a web page for some sort of TV Display and don't want the cursor messing things up
document.addEventListener("DOMContentLoaded", () => {
let idleMouseTimer;
let forceMouseHide = false;
document.body.style.cursor = "none";
Nice defaults
git config --global commit.verbose true
git config --global push.default current
Load up ~/.bashrc
on Mac OS bash
~/.bash_profile
defmodule Marbles do | |
def new do | |
%{size: 0, current: 0, counter: 0} | |
end | |
def to_list(state) do | |
[] | |
|> do_to_list(state, state.current, state.current) | |
|> Enum.reverse | |
end |
Just for fun, I do not recommend using this
Ever heard of I18n
? Probably. But do you know what it stands for? Internationalization.
There's a few other common ones as well
l10n
localizationk8s
kubernetes