Skip to content

Instantly share code, notes, and snippets.

View zfhxi's full-sized avatar
🎯
Focusing

zfhxi zfhxi

🎯
Focusing
View GitHub Profile
@zfhxi
zfhxi / MarkUnreadEmails.scpt
Created July 5, 2022 11:07 — forked from edenwaith/MarkUnreadEmails.scpt
An AppleScript to go through the mailboxes in Outlook and mark unread messages as read
-- File: MarkUnreadEmails.scpt
-- Description: Go through the mailboxes in Outlook and mark unread messages as read
-- Author: Chad Armstrong
-- Date: 22 November 2019
tell application "Microsoft Outlook"
set myInbox to folder "Inbox" of default account
set github to folder "GitHub" of myInbox
set other to folder "Other" of myInbox
@zfhxi
zfhxi / markdown-details-collapsible.md
Created February 17, 2022 16:05 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section containing markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
@zfhxi
zfhxi / setup_wol.sh
Created December 31, 2021 01:49 — forked from paddy74/setup_wol.sh
Setting up wake-on-lan on Arch
#!/bin/bash
# https://wiki.archlinux.org/index.php/Wake-on-LAN
sudo pacman -Syu ethtool
# d (disabled), p (PHY activity), u (unicast activity), m (multicast activity),
# b (broadcast activity), a (ARP activity), and g (magic packet activity)
ethtool <interface> | grep Wake-on
# If not g
ethtool -s <interface> wol g
@zfhxi
zfhxi / t.sh
Created December 4, 2020 16:24 — forked from likohank/t.sh
shell 判断某个元素是否在数组中,查看某个key是否存在
if [[ " ${array[@]} " =~ " ${value} " ]]; then
# whatever you want to do when arr contains value
fi
------------------------------------------------------
if [[ ! " ${array[@]} " =~ " ${value} " ]]; then
# whatever you want to do when arr doesn't contain value
fi
------------------------------------------------------
if [[ " ${!array[@]} " =~ " ${value} " ]]; then
# whatever you want to do when arr contains value