This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Status Bar Decoration | |
set-option -g status-style bg=colour22,fg=colour46 | |
set-option -g window-status-style bg=colour28,fg=colour190 | |
# Customizing status bar | |
set-option -g status-left-length 30 | |
set-option -g status-left "#(echo $USER)@#(echo $HOSTNAME) [#S]" | |
set-option -g status-right-length 40 | |
set-option -g status-right "%a, %d %b %Y %T %z" | |
set-option -g status-interval 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setInterval(() => document.querySelectorAll("._4rbun ~ div").forEach(tag => tag.style.display = "none"), 999) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelectorAll(".GalleryImage_image_3lGzO").forEach(tag => { | |
let link = document.createElement('a'); | |
link.href = tag.src; | |
link.download = tag.src; | |
let e = document.createEvent('MouseEvents'); | |
e.initEvent('click', true, true); | |
link.dispatchEvent(e); | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' 宣告 在檔案 USBIO.dll 所定義的 "OpenUsbDevice" 函數,有兩個整數參數(VenderID, ProductID),會回傳 True: 代表電路板有連接 False: 代表電路板沒有連接 | |
Private Declare Function OpenUsbDevice Lib "USBIO.dll" (ByVal VenderID As Integer, ByVal ProductID As Integer) As Boolean | |
' 宣告 在檔案 USBIO.dll 所定義的 "OutDataCtrl" 子程序,有兩個整數參數 | |
Private Declare Sub OutDataCtrl Lib "USBIO.dll" (ByVal Data As Byte, ByVal Control As Byte) | |
Dim Red As Boolean ' 定義 是否為紅燈亮 的 布林(True or False)變數 | |
Dim LEDs(15) As Integer ' 定義 LED 燈號動作 的 整數陣列 | |
Dim Step As Integer ' 定義 目前在第幾個動作 的 整數變數 | |
Dim StepNumber As Integer ' 定義 有幾個動作 的 整數變數 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.setInterval( | |
() => document.dispatchEvent( | |
new KeyboardEvent('keydown', {'keyCode': 78, 'shiftKey': true}) | |
), 10000 | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
lastb -if /var/log/btmp.1 | awk '{print$3}' | sort | uniq -cd > lastb.log.1 | |
lastb -i | awk '{print$3}' | sort | uniq -cd > lastb.log | |
cat lastb.log.1 lastb.log | sort -n | awk '$1>9{print$2}' | sort -n > try9s.ip | |
echo '===== IPs failed more than 9 times =====' | |
cat try9s.ip | |
while read ip; do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
permute = function (m) t(apply(X = m, MARGIN = 1, FUN = function(v) v[sample(length(v))])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (package in sessionInfo()$otherPkgs) | |
detach(paste0('package:', package$Package), character.only = TRUE) | |
# or | |
lapply(X = sessionInfo()$otherPkgs, FUN = function(package) | |
{ detach(paste0('package:', package$Package), character.only = TRUE)}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in {1..254}; do | |
lookup=$(dig -x 192.168.0.$i +short); | |
[[ -z "$lookup" ]] || echo "192.168.0.$(printf %3s $i)" - $lookup; | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$CF = @{} | |
$CF.Endpoint = "https://api.cloudflare.com/client/v4/" | |
# Replace <API Token> to your CloudFlare API Token | |
# You can create your API Token from https://dash.cloudflare.com/profile/api-tokens | |
$CF.APIToken = "Bearer <API Token>" | |
# Replace <zone id> and <record id> | |
$CF.UpdateDNSRecord = @{Method = "PUT"; object = "zones/<zone id>/dns_records/<record id>"} | |
$PublicIP = (Get-NetIPAddress -InterfaceAlias "<Interface Alias>" -AddressFamily IPv4).IPAddress |
OlderNewer