Skip to content

Instantly share code, notes, and snippets.

View pa-0's full-sized avatar

Peter Abbasi pa-0

  • Chicago
  • 17:35 (UTC -06:00)
View GitHub Profile
@pa-0
pa-0 / Download file from URL.js
Last active December 8, 2023 02:46 — forked from mogsdad/Download file from URL.js
How to "download" a file from a URL directly to Google Drive (no local copy saved) using Google Apps-Script.
/**
* See http://stackoverflow.com/questions/14573055/can-i-download-file-from-url-link-generated-by-google-apps-script/14574217#14574217.
* You can't actually "download" the source file, because apps-script has no access to your PC's file system to write the file, although
* it does have file upload capabilities in the UiApp. (If you're in an Enterprise Google Apps domain, you could copy the retrieved file
* to an internal server, but that's getting off-topic.)
* Example: var result = getFileFromURL("http://some.where.com/file.zip","SomeFolder");
* if (result.rc != 200) { throw new Error("File Not Found"); }
*
* Retrieve a file from the given URL, store into the named folder
* on Google Drive.
@pa-0
pa-0 / libdb[Tuncay2015-02-03].ini
Created December 20, 2023 09:00 — forked from joedf/libdb[Tuncay2015-02-03].ini
Tuncay's AHK Library database (2015-02-03)
[HEADER]
Title=Ahk Standard Library Collection
Home=http://www.autohotkey.com/board/topic/50834-ahk-standard-library-collection-2010-sep-gui-libs-100/
Location=http://autohotkey.net/~Tuncay/ahkstdlib/ahkstdlib.zip
Creator=Tuncay
Timestamp=20150203
AhkTypeCompatible=Basic
AhkTypeCompatibleLocation=http://www.autohotkey.com/
CheckForUpdate=-1
@pa-0
pa-0 / IPC.ahk
Created December 20, 2023 09:02 — forked from Lexikos/IPC.ahk
IPC library by majkinetor
/* Title: IPC
*Inter-process Communication*.
*/
/*
Function: Send
Send the message to another process (receiver).
Parameters:
PidOrName - Process name or ID
@pa-0
pa-0 / pr.md
Created December 20, 2023 16:33 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@pa-0
pa-0 / git-pull-request.py
Created December 20, 2023 16:37 — forked from natecavanaugh/git-pull-request.py
testing pr change
#!/usr/bin/env python
"""
Git command to automate many common tasks involving pull requests.
Usage:
gitpr [<options>] <command> [<args>]
Options:
#SingleInstance,Force ;ensure only 1 version running
SetTitleMatchMode, 3 ;to make sure winMinimize and Sending Control C to ConsoleWindowClass works down below
DetectHiddenWindows,On ;Added becauase minimizing the window
; General Documentation := https://ffmpeg.org/ffmpeg-devices.html#gdigrab Documentation on gdigrab from ffmpeg
; Get list of devices ffmpeg:= ffmpeg -list_devices true -f dshow -i dummy
; Cropping specific area := https://stackoverflow.com/questions/6766333/capture-windows-screen-with-ffmpeg/47591299
;********************Control+Shift+R=Start Recording***********************************
^+r::
FileDelete, %A_ScriptDir%\temp.mp4
@pa-0
pa-0 / Github GistV2.ahk
Created December 21, 2023 06:06 — forked from JoeGlines/Github GistV2.ahk
Github GistV2
if !ClipWait(2)
{
Notify.Default.GenSound := "Error"
Notify.show('The attempt to copy text onto the clipboard failed.')
sleep 3000
Exitapp
}
@pa-0
pa-0 / Select word and send to Notepad.ahk
Created December 21, 2023 06:07 — forked from JoeGlines/Select word and send to Notepad.ahk
Simple script to select a world and send it, via the clipboard, to Notepad. Then restore the clipbaord
/*
* ============================================================================ *
* Want a clear path for learning AutoHotkey? *
* Take a look at our AutoHotkey courses here: the-Automator.com/Learn *
* They're structured in a way to make learning AHK EASY *
* And come with a 200% moneyback guarantee so you have NOTHING to risk! *
* ============================================================================ *
*/
#SingleInstance
@pa-0
pa-0 / OPreddit.md
Last active December 24, 2023 16:24 — forked from anonymous1184/README.md
ahk.v1-2.WinHttpRequest

A user yesterday [wanted a specific voice][^1] out of text-to-speech, but he wanted one from a web version and not included in the OS (ie, there was the need to scrape the page). Thus...

WinHttpRequest Wrapper ([v2.0][^2] / [v1.1][^3])

There's no standardized method to make HTTP requests, basically, we have:

  • XMLHTTP.
  • WinHttpRequest.
  • UrlDownloadToFile.
@pa-0
pa-0 / README.md
Created December 24, 2023 04:38 — forked from anonymous1184/README.md
ReloadEx()

Pending...