Skip to content

Instantly share code, notes, and snippets.

View rey's full-sized avatar
🌴
On vacation

Rey Dhuny rey

🌴
On vacation
View GitHub Profile
@rey
rey / redbull.ps1
Last active November 13, 2023 16:49
# Powershell one-liner to prevent idle / sleep
# https://www.reddit.com/r/PowerShell/comments/ikrouy/comment/g3nd845/
1..9999|ForEach-Object {$S = New-Object -Com "Wscript.Shell"}{Sleep -S (30+$S.Sendkeys("+"))}
@rey
rey / archive.sh
Created September 17, 2023 15:33
Dirty POC script to send Jekyll link posts to the internet archive
#!/bin/bash
# yq:
# snap install yq
# waybackpy:
# pip3 install waybackpy
file="${1}"
post_layout=$(yq --front-matter=extract '.layout' ${file})
@rey
rey / edit-every-file.sh
Created September 14, 2023 14:58
Quick and dirty script that loops thru every file in a folder and opens it in VSC, accepts changes and writes it to a done folder
#! /bin/bash
for file in *; do
cat ${file} > fileContent
/opt/homebrew/bin/code -w fileContent
newFileContent=`cat fileContent`
@rey
rey / rename-files-in-a-folder.sh
Created September 14, 2023 12:58
Quick and dirty script to run in a folder of files you want to rename
# ------------------------------------------------------------------------------------------------------------------------------------------
# This file is called 2018-02-02-932.md
# ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
# ---
# layout: link
# title:
# link:
@rey
rey / gist:75f7d19e155df48bc5b65b710b1cb3aa
Created June 15, 2020 11:19
Can't locate plugins/Markdown.pl in @inc
Can't locate plugins/Markdown.pl in @INC (@INC contains: ./extlib ./lib
/etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x8
6_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at lib/MT.pm line 117 (#2)
(F) You said to do (or require, or use) a file that couldn't be found.
Perl looks for the file in all the locations mentioned in @INC, unless
the file name included the full path to the file. Perhaps you need
to set the PERL5LIB or PERL5OPT environment variable to say where the
extra library is, or maybe the script needs to add the library name
to @INC. Or maybe you just misspelled the name of the file. See
"require" in perlfunc and lib.
> Can't locate plugins/Markdown.pl in @INC (@INC contains: ./extlib ./lib /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at lib/MT.pm line 117.
@rey
rey / keybase.md
Created September 12, 2019 13:04

Keybase proof

I hereby claim:

  • I am rey on github.
  • I am rey (https://keybase.io/rey) on keybase.
  • I have a public key ASBBVSm1XTJCWIfMUtHjEECxGxp4ftG4L44tsHqFKLgY_wo

To claim this, I am signing this object:

Fitbit Sleep data<br>
<br>
```<br>
{<br>
"total time slept":"{{TotalTimeSlept}}",<br>
"time fell asleep":"{{FellAsleepAt}}",<br>
"time awoke":"{{AwokeAt}}",<br>
"time to fall asleep":"{{TimeToFallAsleep}}",<br>
"number of times restless":"{{RestlessCount}}",<br>
"number of times awake":"{{AwakeCount}}"<br>
Fitbit Activity data for: {{Date}}<br>
<br>
```<br>
{<br>
"date":"{{Date}}",<br>
"total steps":"{{TotalSteps}}",<br>
"calories burned":"{{TotalCaloriesBurned}}",<br>
"distance traveled":"{{TotalDistanceCovered}} {{TotalDistanceCoveredUnit}}",<br>
"sedentary minutes":"{{SedentaryMinutes}}",<br>
"lightly active minutes":"{{LightlyActiveMinutes}}",<br>
@rey
rey / harvest.sh
Last active January 9, 2019 18:25
#!/bin/bash
# harvest.sh by Rey Dhuny
#
# About
# --
# Use harvest.sh to generate a quick-and-dirty summary of the current month's hours used for a single project.
#
# Disclaimer
# --