Skip to content

Instantly share code, notes, and snippets.

View ttonyh's full-sized avatar

Tony Habash ttonyh

  • Los Angeles, CA
View GitHub Profile
@ttonyh
ttonyh / esp32_ttgo_t5_213.yaml
Created January 13, 2024 20:00 — forked from TheGroundZero/esp32_ttgo_t5_213.yaml
TTGO T5 v2.3.1 2.13" display in ESPHome
# Board
# https://s.click.aliexpress.com/e/_9IDl91
# ESPHome docs:
# - https://esphome.io/components/display/waveshare_epaper.html
# - https://esphome.io/components/spi.html#spi
# - https://esphome.io/components/display/index.html#formatted-text
substitutions:
esphome_name: esp32_ttgo_t5
choco list --limit-output
# Extract name and find corresponding winget package
| ForEach-Object -Parallel {
$chocoName = $_.Split('|')[0]
Get-WinGetPackage $chocoName -Count 1 |% {
@{
'chocoName' = $chocoName
'wingetPackage' = $_.Name
}
}
@ttonyh
ttonyh / lodash-assignIn-merge-defaults-diff.js
Created December 14, 2023 00:49 — forked from goldo/lodash-assignIn-merge-defaults-diff.js
Differences between .assignIn(), .assign, .merge(), defaults() and defaultsDeep()
// Tests with Lodash 4.16.4
// Thanks to http://stackoverflow.com/questions/19965844/lodash-difference-between-extend-assign-and-merge
_.assignIn ({}, { a: 'a' }, { a: 'bb' }) // => { a: 'bb' }
_.merge ({}, { a: 'a' }, { a: 'bb' }) // => { a: 'bb' }
_.defaults ({}, { a: 'a' }, { a: 'bb' }) // => { a: 'a' }
_.defaultsDeep({}, { a: 'a' }, { a: 'bb' }) // => { a: 'a' }
---
@ttonyh
ttonyh / r-deepin-i-kde.txt
Created September 5, 2023 00:53 — forked from yudi-matsuzake/r-deepin-i-kde.txt
remove deepin install kde
sudo pacman -Rsun deepin deepin-desktop-base deepin-wm deepin-extra lightdm deepin-manjaro
sudo pacman -S plasma kio-extras kde-applications manjaro-kde-settings sddm-breath-theme manjaro-settings-manager-knotifier manjaro-settings-manager-kcm
sudo systemctl enable sddm.service --force
/usr/bin/cp -rf /etc/skel/. ~
@ttonyh
ttonyh / alarm
Created August 6, 2023 19:36 — forked from Misko-2083/alarm
alarm script
#!/bin/bash
# Fancy alarm Misko_2083 @ 2020
# Requires: at, xfce4, wmctrl, xdotool, yad 0.42 (with html dialog), mpv
#########################
# Begin User Interface #
#########################
# JavaScript, HTML and CSS
@ttonyh
ttonyh / reset_kde.txt
Created December 26, 2022 20:41 — forked from Sparklytical/reset_kde.txt
reset kde
Note: don’t try to delete the KDE folders when you’re logged into KDE , it will yield unsatisfactory results.
Below are the steps I took to clean up :
cd ~/
rm -rf .kde
rm -rf .cache/plasmashell*
rm -rf .cache/org.kde.dirmodel-qml.kcache
rm -rf .cache/kioexec/ .cache/krunner/ .cache/ksycoca5*
rm -rf .cache/krunnerbookmarkrunnerfirefoxdbfile.sqlite
rm -f .config/plasma*
@ttonyh
ttonyh / npmTimeMachine
Created December 8, 2021 13:18 — forked from vividn/npmTimeMachine
npmTimeMachine
#!/usr/bin/env bash
# npmTimeMachine
# Quickly get package versions where they would have been on a certain date
# Can be useful for getting out of dependency hell by slowly working your way forward in time
# as if you had stayed up to date in the first place.
#
# The script will run and find the appropriate package versions based on public npm publish data
#
# Usage:
@ttonyh
ttonyh / install-yay
Last active April 10, 2021 01:40 — forked from macchaberrycream/install_yay.bash
[install yay shell script] #ArchLinux
#!/usr/bin/env bash
# Assume JQ is already installed
if ! builtin type -p 'yay' >/dev/null 2>&1; then
echo 'Install yay.'
TMPDIR="$(mktemp -d)"
cd "${TMPDIR}" || return 1
@ttonyh
ttonyh / .aliases
Last active November 24, 2023 22:17 — forked from alekratz/.aliases
Pacman aliases
# Detailed ls list to less in color
if ls --color -d . >/dev/null 2>&1; then
# GNU
alias L="ls --color -l | less -r"
elif ls -G -d . >/dev/null 2>&1; then
# BSD
alias L="CLICOLOR_FORCE=1 ls -l | less -r"
fi