Skip to content

Instantly share code, notes, and snippets.

View kennethbruskiewicz's full-sized avatar

Kenneth Bruskiewicz kennethbruskiewicz

  • Vancouver, Canada
View GitHub Profile
@isomorphisms
isomorphisms / how.to.strikethrough
Last active July 7, 2016 15:05
Flag flabby sentences.
Unicode[edit]
Combining characters[edit]
In plain text scenarios where markup cannot be used, Unicode offers a number of
combining characters that achieve similar effects.
The “combining long stroke overlay” (U+0336) results in an unbroken stroke
across the text:
@redguardtoo
redguardtoo / proj2ram
Last active May 17, 2022 18:12
script to copy project to tmpfs
#!/bin/sh
if [ -z "$1" ];then
echo "Usage:"
echo " proj2ram proj-name"
echo " proj2ram restore proj-name"
exit 1
fi
@cornhundred
cornhundred / .gitignore
Last active November 20, 2019 19:35
D3 Clustergram with zoom/panning, reordering, and search.
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@paulirish
paulirish / what-forces-layout.md
Last active April 24, 2025 09:45
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@JamesSkemp
JamesSkemp / RP2SambaSeagate.md
Last active January 18, 2021 19:06
Raspberry Pi 2 Samba server w/ a Seagate Backup Plus Slim 1TB

Setting up a Raspberry Pi 2 Samba server (in early January 2016)

The following is how I configured a Raspberry Pi 2 as a samba server, using a Seagate Backup Plus Slim, 1TB, drive.

For ease I purchased the CanaKit Raspberry Pi 2 Complete Starter Kit. It runs about $70 and includes enough to get up and running with the Raspberry Pi 2, with the Pi itself, a nice case, power supply, HDMI cable, WiFi adapter, and SD card with NOOBS/Raspbian installer.

For the hard drive I opted to purchase a Seagate Backup Plus Slim 1TB Portable External Hard Drive, since I've had good enough luck with Seagate in the past, and reviews are generally favorable. This ran me $60. I confirmed that it worked fine on my Windows 10 machine, and was already formatted to NTFS.

Unfortunately, once I received the Pi and drive I found that the power supply/Pi wasn't putting off enough power to keep the drive running. After looking at the options, including tweaking the Pi to pass throu

@mariocesar
mariocesar / README.md
Last active August 24, 2018 19:33
Useful docker containers

PostgreSQL

Creating a postgresql 9.5 container with persistent database

docker volume create pgdata
docker run --detach \
  --volume pgdata:/var/lib/postgresql/data \
  --name postgres \
 --env POSTGRES_PASSWORD=postgres \
@sergiodxa
sergiodxa / async-thread.js
Last active June 27, 2023 05:38
Use WebWorkers and promises to run sync heavy functions in a worker (process) and get the result in a promise
function asyncThread(fn, ...args) {
if (!window.Worker) throw Promise.reject(
new ReferenceError(`WebWorkers aren't available.`)
);
const fnWorker = `
self.onmessage = function(message) {
(${fn.toString()})
.apply(null, message.data)
.then(result => self.postMessage(result));
@neilhwatson
neilhwatson / web-servers.md
Created October 31, 2016 20:14 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@mromanello
mromanello / process BMCR.ipynb
Created November 23, 2017 11:23
Quick and dirty notebook to demonstrate the extraction of canonical references from one BMCR record.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.