Skip to content

Instantly share code, notes, and snippets.

Avatar

Joshua Ziggas jziggas

  • zedsoft
  • Baltimore, MD
View GitHub Profile
View AngularPerformanceBestPractices.md

Angular Peformance Guidelines

Runtime strategies

These are the strategies we can use while the application is running in the browser.

Avoid function calls in view templates

Angular's zone can perform change detection every time there is a user interaction on the document, such as during a click, mouse move, timer tick, or http call. Therefore function calls in the template get invoked and recalculated each time this happens. This can add a lot of unnecessary overhead during runtime especially with complex logic or multiple function calls

View keybase.md

Keybase proof

I hereby claim:

  • I am jziggas on github.
  • I am jzig (https://keybase.io/jzig) on keybase.
  • I have a public key ASC5-np7Bnt5nKTsGOWTFKcTqFmmxBu31ZgB5NHnAYjUXwo

To claim this, I am signing this object:

View gist:af381e6cc062943c505fd6c5fc7856fc
cat << EOF > ~/.gnupg/gpg-agent.conf
enable-ssh-support
pinentry-program /usr/local/bin/pinentry
default-cache-ttl 600
max-cache-ttl 7200
default-cache-ttl-ssh 1800
max-cache-ttl-ssh 7200
EOF
View gist:18ff1712aaeccc9454a9dbae723bb3be
cat << EOF > ~/.gnupg/gpg.conf
no-emit-version
no-comments
keyid-format 0xlong
with-fingerprint
list-options show-uid-validity
verify-options show-uid-validity
use-agent
fixed-list-mode
charset utf-8
@jziggas
jziggas / nowhal.js
Last active Apr 9, 2021
JavaScript to delete all of your Reddit comments
View nowhal.js
// Go to https://www.reddit.com/user/<username>/ and paste into your console.
// Reddit throttles these actions, hence the 1s timer.
let interval = setInterval(() => {
let deleteButtons = $('a.togglebutton[data-event-action="delete"]');
if (deleteButtons.length === 0) {
clearInterval(interval);
if ($('.next-button > a')[0]) {
$('.next-button > a')[0].click();
alert('Restart script.');
}