Skip to content

Instantly share code, notes, and snippets.

View rnicholus's full-sized avatar
🎸
Searching for Jerry

Ray Nicholus rnicholus

🎸
Searching for Jerry
View GitHub Profile
@getaaron
getaaron / irs-get-human.md
Created April 1, 2024 23:01
Get a person at the IRS
  • Call 1-800-829-1040
  • Press 1 for English (or other language as desired)
  • Press 2 for personal tax
  • Press 1 for form / tax history
  • Press 3 for other
  • Press 2 for other
  • Ignore 2 SSN prompts till you get secret other menu
  • Press 2 for personal tax
  • Press 3 for other
  • Wait for agent!
@mjackson
mjackson / createBinding.js
Last active September 18, 2021 09:19
A workaround for the lack of a promise cancelation API
/**
* Registers the given callback to be called in the node.js callback
* style, with error as the first argument, when the promise resolves.
*
* Also, returns a function that may be used to prevent the callback
* from ever being called. Calling the returned function is synonymous
* with saying "I no longer care about the resolution of this promise,
* even if it fails."
*
* Since there is no provision in the promise spec for cancel/abort
@paulirish
paulirish / what-forces-layout.md
Last active May 6, 2024 07:54
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
@tonymtz
tonymtz / gist:d75101d9bdf764c890ef
Last active December 29, 2023 00:40
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*

How to become a decent photographer in five years

You're not gonna become a master in your spare time, but you can get decently good at photography in five years of dedicated but non-full-time practice. It's taken me about twice that to get decent, but I fucked around a lot along the way.

You don't need a ton of fancy equipment, but photography does require some gear. I'll limit the gear-buying here to once a year (not counting books).

@addyosmani
addyosmani / unit_testing.md
Last active July 27, 2020 05:17
Unit Testing Polymer Elements

Deprecated. See https://www.polymer-project.org/articles/unit-testing-elements.html for the latest version.

Unit Testing Polymer Elements

Note: this guide is a work-in-progress and will be added to the Polymer docs when it's ready. We have updated <seed-element> to include unit tests and this guide has been moved to Google docs. Expect a version on the Polymer site before the end of September.

After spending days working on your <super-awesome> Polymer element, you’re finally ready to share it with the rest of the world. You add the code for using it to your demo, iterate on it over time and come back to it one day when..uh oh. The demo broke because something has gone horribly wrong. Suddenly, <super-awesome> isn’t starting to look so great. Now you’re stuck trying to backtrack through your commit log to figure out how you broke the code. You’re not going to have a fun time.

If you’ve been working on the front-end for a while, even if you haven’t really played with Polymer elements before, this s

@rnicholus
rnicholus / gist:9c02b2da9351923e4782
Last active August 29, 2015 14:01
JavaScript 101

Why?

More and more of our application code will live in the browser over time as JavaScript, and perhaps our server code will utilize the same language as well. Luckily, it's pretty easy to learn JavaScript. JavaScript is becoming more central to web applications.

With this in mind, it will be beneficial for non-developers to gain a better understanding of this language, and how it is used in the browser and on the server. We can start out simple, and work up to the level of proficiency required to aid in debugging web app issues, writing automated end-to-end tests. Perhaps you will find yourself developing a web application of your own.

Course Outline

I hope to hold 1 - 1.5 hour sessions every 2-3 weeks, depending on my schedule. Perhaps other developers can assist as well, schedule permitting.

@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 6, 2024 02:17
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@orip
orip / build.gradle
Created February 14, 2013 09:52
Print Gradle test results to console
/*
Sample output:
> gradle test ruby-1.9.3-p194 testing_with_gradle 9179829 ✗
...
:test
Results: SUCCESS (84 tests, 74 successes, 0 failures, 10 skipped)
*/
test {
testLogging {
@madan712
madan712 / ImageCropper.java
Created September 2, 2012 17:46
Java - Simple image cropping example
/* ImageCropper.java */
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
public class ImageCropper {