Skip to content

Instantly share code, notes, and snippets.

View gabubellon's full-sized avatar
🏳️‍🌈

Gabriel (Gabu) Bellon gabubellon

🏳️‍🌈
View GitHub Profile
@l3nz
l3nz / README.md
Last active August 8, 2023 05:54
NOT Fixed: accountsd using 400% CPU on MacOS Catalina 10.15.7 (19H2)

accountsd using 400% CPU on MacOS Catalina 10.15.7 (19H2)

TL;DR: Still open - see below.

This morning I woke up to some not-so-nice surprise - my 2018 MPB 13" would be kind of totally unusable. The accountsd process was stable at 400%, battery was going like ice-cream in the Sahara, and opening up LibreOffice was like a major achievement.

I did check the logs (that were growing at like 500 lines per second) and I saw a lot of lines at FAULT level:

fault 07:54:04.271342+0200 accountsd Unentitled access by client 'CallHistoryPlugi' (selector: accountsWithAccountType:handler:)

@jvfe
jvfe / get_covid_data_jhu.py
Last active November 14, 2021 00:05 — forked from fernandobarbalho/get_covid_data_jhu.r
Function to create COVID-19 dataset from JHU github
import pandas as pd
import datetime
def get_covid_data_jhu(dt_ini, dt_fim, us_columns = True, country = None):
date_range = pd.date_range(start = dt_ini, end = dt_fim).to_list()
string_range = [str(d.date().strftime("%m-%d-%Y")) for d in date_range]
full_data_list = []
for dat in string_range:
@longtimeago
longtimeago / squash-commits.md
Last active April 1, 2024 20:44
How to squash commits in a GitHub pull request

How to squash commits in a GitHub pull request

o you've contributed some code to an open source project, say, Rails. And they'd like you to squash all of the commits in your pull request. But you're not a git wizard; how do you make this happen?

Normally, you'd do something like this. I'm assuming upstream is a git remote that is pointing at the official project repository, and that your changes are in your 'omgpull' branch:

@meinside
meinside / smartctl_test.md
Last active March 20, 2024 21:26
For checking health of usb hdd on raspberry pi with smartctl.

for testing external hdd with smartctl,

install smartmontools

$ sudo apt-get install smartmontools

start test,

@bzerangue
bzerangue / _verify-repair-permissions-disk.md
Last active April 25, 2024 22:55
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

@benschw
benschw / git-origins.md
Last active September 20, 2023 08:54
fork a repo manually (set source as upstream origin) rather than with the "fork" button. e.g. for in github when you want to fork a project twice.

Ripped off from adrianshort.org

List curent remotes

$ git remote -v

origin  https://github.com/hakimel/reveal.js.git (fetch)
origin  https://github.com/hakimel/reveal.js.git (push)

Rename origin to upstream and add our new empty repo as the origin.

@hofmannsven
hofmannsven / README.md
Last active April 19, 2024 13:17
Git CLI Cheatsheet