Skip to content

Instantly share code, notes, and snippets.

View hasokeric's full-sized avatar
👋

Haso Keric hasokeric

👋
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!
@hasokeric
hasokeric / nx-structure-angular-nestjs.md
Created January 21, 2023 23:33 — forked from trungvose/nx-structure-angular-nestjs.md
Nx workspace structure for NestJS and Angular

Nx

https://nx.dev/

Nx is a suite of powerful, extensible dev tools to help you architect, test, and build at any scale — integrating seamlessly with modern technologies and libraries while providing a robust CLI, caching, dependency management, and more.

It has first-class support for many frontend and backend technologies, so its documentation comes in multiple flavours.

Principles

@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active May 3, 2024 13:01
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@paulirish
paulirish / what-forces-layout.md
Last active April 30, 2024 17:56
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
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@grvhi
grvhi / twbs-btn-gradients
Last active October 21, 2022 22:24
A simple CSS overwrite to add old-style gradients to Bootstrap 3 flat buttons. CSS created from http://twitterbootstrap3buttons.w3masters.nl
.btn-primary {
background-color: #08c;
border-color: #08c;
color: #fff;
background-color: #007ab8;
background-image: -moz-linear-gradient(top, #08c, #006699);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#006699));
background-image: -webkit-linear-gradient(top, #08c, #006699);
background-image: -o-linear-gradient(top, #08c, #006699);
background-image: linear-gradient(to bottom, #08c, #006699);
@ericlbarnes
ericlbarnes / foreach_limit.blade.php
Last active July 13, 2023 07:51
Limit a foreach with Laravel blade
@foreach (array_slice($posts->toArray(), 0, 5) as $post)
<h1>{{ $post['title'] }}</h1>
@endforeach
@JeffreyWay
JeffreyWay / gist:5695346
Created June 2, 2013 23:33
And we wonder why we get overwhelmed.
So you want to accept payments online with PHP?
- Well, you probably don't want to handle that process manually. Too dangerous and risky.
- So learn the Stripe API. Works great!
- But you'll still need to setup SSL. So go learn how to do that.
- Stripe provides a PHP package, so download that through Composer. If you're not familiar with Composer, you'll need to learn that too.
- If you want the most flexibility, you'll want to manually create the payment form.
- So you'll need to send an AJAX request with a special token to Stripe's API. jQuery makes this easy, so go learn jQuery.
- Once the payment completes, you'll likely want to send the buyer a "Purchased" email, so learn how to send email.
- But don't make the user wait for the email to send. That takes too long. Add that to a background job.
@JeffreyWay
JeffreyWay / pubsub.js
Created May 31, 2013 03:37
jQuery PubSub in three lines. This will work in IE9+, so it's a perfect choice for jQuery 2.0 projects.
var o = $({});
$.subscribe = o.on.bind(o);
$.publish = o.trigger.bind(o);