Skip to content

Instantly share code, notes, and snippets.

View amirhp-com's full-sized avatar
🔥

Amirhossein Hosseinpour amirhp-com

🔥
View GitHub Profile
@amirhp-com
amirhp-com / preventShutdow.au3
Last active April 23, 2016 11:10
AU3 # Prevent Script from System Poweroff
;RUNGUI() ; Remove ';' from first line , so script GUI will open
Func RUNGUI()
$WM_QUERYENDSESSION2 = 0x11
GUIRegisterMsg($WM_QUERYENDSESSION2, "Cancel_Shutdown")
$Hwnd = GUICreate("PreventShutdownGUI")
GUISetSTate(@SW_SHOW)
MsgBox(262144,'','Hello kitty')
@amirhp-com
amirhp-com / cloudSettings
Last active May 1, 2020 20:02
vscodesync
{"lastUpload":"2020-05-01T20:02:39.487Z","extensionVersion":"v3.4.3"}
@amirhp-com
amirhp-com / php-html-css-js-minifier.php
Created May 20, 2020 07:41 — forked from Rodrigo54/php-html-css-js-minifier.php
PHP Function to Minify HTML, CSS and JavaScript
<?php
/**
* -----------------------------------------------------------------------------------------
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php`
* -----------------------------------------------------------------------------------------
*/
// HTML Minifier
function minify_html($input) {
@amirhp-com
amirhp-com / index.pug
Created June 30, 2020 21:55
Sample GSAP Ambulance ;)
.sky
i.fa.fa-ambulance#bike
.earth
@amirhp-com
amirhp-com / madelineproto_test.php
Last active July 9, 2020 19:35
Madelineproto Test, get channel or user's info by giving IDs ..
<?php
echo "<title>Madelineproto Test by KING HPV</title>";
/**
* check for required modules and if not installed_
* install them and include into current project
*/
file_exists('madeline.php') OR copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
include 'madeline.php';
@amirhp-com
amirhp-com / index.php
Last active July 27, 2020 08:39
Get WordPress Custom Posts by Custom Taxonomy Slug
<?php
/**
* Use snippet below to Get WordPress Custom Posts by Custom Taxonomy Slug
* Developed by Amirhosseinhpv ( https://hpv.im/ )
*/
$cpt = "mapify"; // custom post type
$cpt_taxonamy = "mapify_category"; // custom post type taxonamy
$ctp_taxonomy_slug = "official"; // custom post type taxonamy slug
@amirhp-com
amirhp-com / index.js
Last active July 27, 2020 15:48
Check if a URL is valid image in JavaScript
/*
* Check if a URL is valid image in JavaScript
*
* Usage: pass the url to isValid(), if it's a valid image url,
* the function will return URL and if not, you'll get false or
* whatever you've entered in second parameter
*
* Developer: Amirhosseinhpv ( https://hpv.im/ )
* Snippet at: 1399-05-06 2020-07-27 19:11
*/
/**
* Validates hex value
* @param {String} color hex color value
* @return {Boolean}
*/
function isValidHex(color) {
if(!color || typeof color !== 'string') return false;
// Validate hex values
if(color.substring(0, 1) === '#') color = color.substring(1);
@amirhp-com
amirhp-com / atom.backup
Last active January 25, 2021 20:46
ATOM IDE automatic update by http://atom.io/packages/sync-settings
1500e4bf053970bf17d119a9f96f4a68399a2e7c