Skip to content

Instantly share code, notes, and snippets.

View BobToninho's full-sized avatar
馃悩

Roberto Tonino BobToninho

馃悩
View GitHub Profile
@joelambert
joelambert / README
Created June 1, 2011 11:03
Drop in replacements for setTimeout()/setInterval() that makes use of requestAnimationFrame() where possible for better performance
Drop in replace functions for setTimeout() & setInterval() that
make use of requestAnimationFrame() for performance where available
http://www.joelambert.co.uk
Copyright 2011, Joe Lambert.
Free to use under the MIT license.
http://www.opensource.org/licenses/mit-license.php
@paulirish
paulirish / what-forces-layout.md
Last active August 21, 2025 20:11
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
@klaaspieter
klaaspieter / ASS.md
Created June 22, 2017 07:59 — forked from anonymous/ASS.md
Acronyms Seriously Suck - Elon Musk

From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:

There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.

That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.

@tanyuan
tanyuan / iterm2.md
Last active January 18, 2025 02:59
馃摵 iTerm2 tips & tricks

iTerm2 (The awesome terminal for Mac)

Look and feel

  • Window theme: Preferences > Appearance Tab > Theme > Light/Dark
  • Show folder icon on window title: Preferences > Appearance Tab > Window: Show proxy icon in window title bar
  • Background transparancy and blur: Preferences > Profiles Tab > Window Tab > Transparency (a third) & Blur (Checked, full)
  • Color theme: Preferences > Profiles Tab > Colors Tab > Color Presets...

Window and tab title

@dewbjorn
dewbjorn / script.ahk
Last active May 25, 2023 15:10
My AutoHotKey scripts
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its speed and reliability.
WindowTitlesToToggleMinimizedAndFullScreenStates := ["Seinfeld", "13tv.co.il", "注专讜抓 13", "注专讜抓 12", "讞讚砖讜转 13", "讛诪住讱 讛诪驻讜爪诇", "VLC"]
ProcessNamesToToggleMuteOn := ["chrome.exe", "brave.exe"]
SoundUpAndDownVolumeStep = 10
; Increase or decrease volume using a specific step
; Originally written to make the Das Keyboard Professional volume knob less annoying, making it behave like it does on MacOS
@lisawolderiksen
lisawolderiksen / git-commit-template.md
Last active August 21, 2025 14:03
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@skyzyx
skyzyx / homebrew-gnubin.md
Last active July 17, 2025 13:00
Using GNU command line tools in macOS instead of FreeBSD tools

macOS is a Unix, and not built on Linux.

I think most of us realize that macOS isn't a Linux OS, but what that also means is that instead of shipping with the GNU flavor of command line tools, it ships with the FreeBSD flavor. As such, writing shell scripts which can work across both platforms can sometimes be challenging.

Homebrew

Homebrew can be used to install the GNU versions of tools onto your Mac, but they are all prefixed with "g" by default.

All commands have been installed with the prefix "g". If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH from your bashrc.

@j-iNFINITE
j-iNFINITE / folder_organize.ps1
Last active July 27, 2021 21:09
powershell script for organize files in a folder锛宎ccording to the year, month, day and extension
$path = "your folder path"
Set-Location $path
foreach ($file in (get-childitem $path | where { ! $_.PSIsContainer } ))
{
$year=$file.CreationTime.Year
$month=$file.CreationTime.Month
$day=$file.CreationTime.Day
$ext=($file.Extension).Trim(".")
$newpath=$path,$year,$month,$day,$ext -Join "\"
if (Test-Path $newpath){
@LukeMathWalker
LukeMathWalker / audit.yml
Last active August 23, 2025 09:47
GitHub Actions - Rust setup
name: Security audit
on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
@TheSherlockHomie
TheSherlockHomie / RenewExpiredGPGkey.md
Created January 3, 2021 16:36
Updating expired GPG keys and backing them up 馃攽馃攼馃捇

Updating expired GPG keys and their backup 馃攽馃攼馃捇

I use a GPG key to sign my git commits.

An error like this one might be a sign of an expired GPG key.

error: gpg failed to sign the data fatal: failed to write commit object