Skip to content

Instantly share code, notes, and snippets.

Working from home

Newton iamnewton

Working from home
View GitHub Profile
iamnewton / _images.scss
Created Jan 24, 2020
Some SCSS helpers
View _images.scss
/// Rounded corners on images
/// @author Newton Koumantzelis
/// @since 1.0.0 - The Sith
/// @example html
/// <img src="" class="img-broken" alt="Generic image">
.img-broken {
position: relative;
min-height: 3rem;
iamnewton / readFile.js
Last active Dec 4, 2019
Read a file line-by-line and update a line of it
View readFile.js
const fs = require('fs');
const readline = require('readline');
const readFile = () => {
// create readline interface and output to a new file; can't figure out how to write to same file
const readInterface = readline.createInterface({
input: fs.createReadStream(findup('')),
output: fs.createWriteStream(''),
console: false

Keybase proof

I hereby claim:

  • I am iamnewton on github.
  • I am chrisopedia ( on keybase.
  • I have a public key whose fingerprint is 6AE7 083D 4404 07C0 7EB1 18EA 3802 412D 8420 6E38

To claim this, I am signing this object:

iamnewton / format-stock-spreadsheet.js
Last active Mar 3, 2018
Runs a few scripts to format the Gain & Loss sheets from stock data.
View format-stock-spreadsheet.js
* Format the first column of text (if its present) by removing anything
* beyond the pipe character '|'; then copy down til a new name is presented
* For more information on using the Spreadsheet API, see
function copyNameColumn() {
var SHEET = SpreadsheetApp.getActiveSheet(); // get the active selected sheet;
var RANGE = SHEET.getDataRange(); // ranges are equivalent to rows
var RANGE_VALUES = RANGE.getValues(); // an array of arrays is returned for the values

Keybase proof

I hereby claim:

  • I am chrisopedia on github.
  • I am chrisopedia ( on keybase.
  • I have a public key whose fingerprint is 69F5 8F0D 59D8 9A62 0D75 1F15 D879 14C4 927D 67AC

To claim this, I am signing this object:

iamnewton / javascript-for-vim-refactoring.js
Created Sep 25, 2015 — forked from derwiki/javascript-for-vim-refactoring.js
Moving faster with Vim (5-minute lightning talk presentation). I wasn't inspired to learn effective command of Vim until I saw some people flying around faster than I thought was possible. The goal of this presentation is to call out how slow "normal" text editing is, and how many keystrokes can be reduced by using increasingly more terse Vim co…
View javascript-for-vim-refactoring.js
$(function() {
// good opportunity to combine into a single statement
// qq w cw <esc> A, <esc> 0 j q
var a = 10;
var b = 20;
var c = 30;
var d = 40;
var e = 50;
// opportunity to simplify syntax
iamnewton /
Last active Sep 19, 2015 — forked from paulirish/
What forces layout/reflow in Chrome. 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.


Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
set -e
# Send a private message to someone on slack
# from the command line.
# Print a usage message and exit.
local name=$(basename "$0")
View rubi.js
module.exports = function rubi( hook ) {
// has a range of node modules available - see
// We use request ( for an easy way to
// make the HTTP request.
var request = require( 'request' );
// The parameters passed in via the slash command POST request.
var params = hook.params;
iamnewton /
Created Jul 21, 2015
Cross-Browser Text Masks with Blend Modes

For effective clipping effects, a font that has bold lettering and thick strokes tends to work best.


You can’t perform that action at this time.