Skip to content

Instantly share code, notes, and snippets.

View Rican7's full-sized avatar
😮
My dotfiles just keep getting better... and its been OVER 10 YEARS NOW! ⌚😮🤯

Trevor N. Suarez Rican7

😮
My dotfiles just keep getting better... and its been OVER 10 YEARS NOW! ⌚😮🤯
View GitHub Profile
@Rican7
Rican7 / KeepAwake.ps1
Last active January 25, 2021 10:50 — forked from jamesfreeman959/keepawake.ps1
KeepAwake - Keep Windows "awake" - A PowerShell script to keep Windows awake and make think the user is active on the keyboard
# KeepAwake - Keep Windows "awake"
#
# Useful for keeping awake during the running long/maintenance processes without
# having to change power or screen-saver options.
#
# See https://gist.github.com/jamesfreeman959/231b068c3d1ed6557675f21c0e346a9c
Write-Host @"
KeepAwake running...
@Rican7
Rican7 / internetarchive-download.md
Created October 29, 2020 01:58
Download multi-file items from the Internet Archive (archive.org)

Internet Archive (archive.org) multi-file item downloading

Finding an item to download

  1. Find an item that you'd like to download (for example: https://archive.org/details/SuperNintendoUSACollectionByGhostware)
  2. Grab its "identifier" (you can see it in the HTML of the page, but otherwise just use the last part of the URL for a "details" page)

Downloading the files

At this point, you could just download the files by clicking on them on the HTML page, but that's slow and concurrent-download-limited... Sooo...

@Rican7
Rican7 / windows-volume-clone.bat
Last active March 15, 2024 00:12
Windows built-in volume "clone"
robocopy <source> <destination> /E /COPYALL /DCOPY:DATE /SL /SJ /ZB /V
@juanje
juanje / description.md
Last active June 12, 2024 23:17
Connect services with docker-compose at multirepo project

Connect services with docker-compose at multirepo project

Sometimes you have a project with different services (or microservices) and each one of them has its own repository. At those cases, tests the whole project (and its interactions) can be challenging.

With Docker and Docker Compose you can run easily each service from its repo, but for making them to see each other you (usually) need to manually create a network with Docker, assume so facts (as directories names) or do some crazy network configurations.

TL;DR

You have the final configuration here.

@deanbot
deanbot / keepawake.ps1
Last active July 19, 2022 16:03 — forked from jamesfreeman959/keepawake.ps1
PowerShell script to keep a Windows PC awake
# PowerShell script to keep a Windows PC awake
Write-Host "Keeping PC awake... (send Ctrl+C to quit)"
while (1) {
$wsh = New-Object -ComObject WScript.Shell
$wsh.SendKeys('+{F15}')
Start-Sleep -seconds 59
}
@Rican7
Rican7 / instagram-download-all-post-media.js
Last active November 7, 2019 00:01
Download all media of an Instagram post in new tabs (windows). (NOTE: Only works on direct post page links, not "lightboxed" posts from profile pages)
(function (scope) {
/* NOTE: Comments are all in "block" form for easier bookmark one-lining */
let download = async function (url) {
const filename = (new URL(url)).pathname.split("/").pop();
const fetched = await fetch(url);
const tempElement = document.createElement("a");
tempElement.target = "_blank";
@Rican7
Rican7 / instagram-open-all-post-media.js
Last active November 7, 2019 00:00
Open all media of an Instagram post in new tabs (windows). (NOTE: Only works on direct post page links, not "lightboxed" posts from profile pages)
(function (scope) {
/* NOTE: Comments are all in "block" form for easier bookmark one-lining */
/* Public pages will hold their entry data here */
let entries = scope._sharedData.entry_data.PostPage;
/* If the data doesn't exist there... */
if (entries[0].graphql === undefined) {
/* Logged in pages will have the data stored in a different location */
entries = Object.values(scope.__additionalData).map(x => x.data);
@karanlyons
karanlyons / ZoomDaemon.yara
Last active July 12, 2021 14:07
Fixes for Zoom, RingCentral, Zhumu (and additional white labels) RCE vulnerabilities
private rule Macho
{
meta:
description = "private rule to match Mach-O binaries (copied from Apple's XProtect)"
condition:
uint32(0) == 0xfeedface or uint32(0) == 0xcefaedfe or uint32(0) == 0xfeedfacf or uint32(0) == 0xcffaedfe or uint32(0) == 0xcafebabe or uint32(0) == 0xbebafeca
}
rule ZoomDaemon
{
@jamesfreeman959
jamesfreeman959 / keepawake.ps1
Last active June 12, 2024 16:31
A very simple PowerShell script to keep a Windows PC awake and make lync think the user is active on the keyboard
# Useful references:
#
# https://superuser.com/questions/992511/emulate-a-keyboard-button-via-the-command-line
# https://ss64.com/vb/sendkeys.html
# https://social.technet.microsoft.com/Forums/windowsserver/en-US/96b339e2-e9da-4802-a66d-be619aeb21ac/execute-function-one-time-in-every-10-mins-in-windows-powershell?forum=winserverpowershell
# https://learn-powershell.net/2013/02/08/powershell-and-events-object-events/
#
# Future enhancements - use events rather than an infinite loop
$wsh = New-Object -ComObject WScript.Shell
while (1) {
@Rican7
Rican7 / Enable Import Photos and Videos.bat
Created October 16, 2017 17:13
Enable the old style (Win 7) "Import pictures and videos" AutoPlay option for Windows 10
cd "C:\Program Files (x86)\Windows Photo Viewer"
regsvr32 PhotoAcq.dll
regsvr32 PhotoViewer.dll