Skip to content

Instantly share code, notes, and snippets.

View aviaryan's full-sized avatar
:electron:
Working

Avi Aryan aviaryan

:electron:
Working
View GitHub Profile
@aviaryan
aviaryan / Gdip_SetImagetoClipboard.ahk
Created July 16, 2013 13:31
Set image file to Clipboard
Gdip_SetImagetoClipboard( "S:\Portables\AutoHotkey\My Scripts\lo.jpg" )
return
Gdip_SetImagetoClipboard( pImage ){
;Sets some Image file to Clipboard
PToken := Gdip_Startup()
pBitmap := Gdip_CreateBitmapFromFile(pImage)
Gdip_SetBitmaptoClipboard(pBitmap)
Gdip_DisposeImage( pBitmap )
Gdip_Shutdown( PToken)
@aviaryan
aviaryan / CDN.md
Created October 2, 2019 07:54 — forked from vinkla/CDN.md
A guide on how to upload images to GitHub's CDN through issue and pull request text fields.

Upload Images to GitHub's CDN

  1. First, visit any repository on GitHub and click your way through to the issues page.

  2. Create a new issue by clicking the New Issue button. You'll now see title and description fields.

  3. Drag-and-drop an image on to the description field. This will start the uploading process.

  4. Copy the URL and use it in README, issues or pull requests however you like.

@aviaryan
aviaryan / request_context_task_celery_flask.py
Created July 14, 2016 18:07
request context task celery flask
"""
Celery task wrapper to set request context vars and global
vars when a task is executed
Based on http://xion.io/post/code/celery-include-flask-request-context.html
"""
from celery import Task
from flask import has_request_context, make_response, request, g
from app import app # the flask app
@aviaryan
aviaryan / Autohotkeyupdater.ahk
Last active May 28, 2019 16:37
AutoHotkey Updater - Know when there exists update for Autohotkey_L
/*
AutoHotkey Updater by Avi Aryan
Updated 24/4/13
===============================
For AHK_L
As ahk_basic is not updated anymore . Version stuck to 1.0.48.05
===============================
---------
Know-Hows
@aviaryan
aviaryan / Extreme Screen Clipper.ahk
Last active May 28, 2019 16:37
Extreme Screen Clipper - Capture selected area screenshots and resize them on the fly.Save screenshots as jpg, png, tiff .
/*
ProgramName = Extreme Clipper
ProgramVersion = 1
Author = Avi Aryan
Special Thanks = Sean
****************************************************
.......................
INSTRUCTIONS
***************************************************
USE ONLY WITH AHK_L ANSI
@aviaryan
aviaryan / HotstringTimed.ahk
Created June 10, 2013 05:19
Hotstrings with expiry time support
gosub, iniths
;######### YOUR HOTSTRING AREA ###################################
::btw::
SendLimit("btw", "by the way", 1500) ;type btw within 1.5 secs
return
::wth::
SendLimit("wth", "what the hell", 1000)
return
@aviaryan
aviaryan / ScriptMem [Function].ahk
Last active May 28, 2019 16:34
Reduce memory consumption of your Autohotkey scripts. Works with all Ahk versions.
/*
ScriptMem - Reduce Memory consumption of your AHK Script
by Avi Aryan
Thanks --
HERESY - for EmptyMem function
just me - for GetScriptPID fucntion
Works with all AHK

Setup remote git repo on EC2

Create a bare repository

$ mkdir <repo-name>.git
$ cd <repo-name>.git
$ git init --bare
@aviaryan
aviaryan / open-note-taking-format
Last active December 14, 2018 08:18
open note taking format
----
note_id: b1fd72f5-ff0a-46f9-a41b-4e3f4208bf18
notebook_id: 49bf069c-08b8-465f-845b-e39b24a513c4
title: Open Note-taking Format
tags: spec rant
created: 2018-12-10T10:00:43
modified: 2018-12-12T20:09:32
is_trashed: false
----
Verifying my Blockstack ID is secured with the address 1CYA733ju6n6VSnYtqymNfikoYBdwrJGvY https://explorer.blockstack.org/address/1CYA733ju6n6VSnYtqymNfikoYBdwrJGvY