This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# wait before exiting script or force update? | |
# .\script.ps1 -force 0 -wait 1 | |
param ([bool] $wait = $false, [bool] $force = $false) | |
$global:ErrorActionPreference = 'SilentlyContinue' | |
$global:ProgressPreference = 'SilentlyContinue' | |
Clear-Host | |
Write-Host "**************************************************************" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Written and Tested in VC++ (C++11 code) | |
// by @CodeAngry | |
// | |
// get the maker name | |
int vCpuBuffer[4]{}; | |
__cpuid(vCpuBuffer, 0); | |
unsigned int vHighestFeature((unsigned int)vCpuBuffer[0]); | |
char vCpuMaker[32]{}; // zero-fill |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary>Values that represent the methods available to get the file size.</summary> | |
/// <remarks>Claude "CodeAngry" Adrian, 20 May 2012.</remarks> | |
typedef enum class file_size_methods { | |
create_file = 1, // CreateFile, GetFileSizeEx, CloseHandle (II speed, I reliable) | |
get_attributes = 2, // GetFileAttributesEx (I speed) | |
find_file = 3, // FindFirstFile, FindClose (III speed) | |
} file_size_method; | |
/// <summary>Gets athe file size using the chosen method.</summary> | |
/// <remarks>Claude "CodeAngry" Adrian, 20 May 2012.</remarks> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Verifies a PayPal Live/Sandbox IPN. | |
* | |
* It returns NULL if freak error occurs (no connection, bad reply, bad IPN). | |
* It returns BOOL to signal verification success or failure. | |
* | |
* @author Claude "CodeAngry" Adrian | |
* | |
* @param array/null $IPN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The right way to do a SEO HTTP Redirection. (says me) | |
* | |
* @copyright Claude "CodeAngry" Adrian | |
* @link http://codeangry.com/ | |
* @license WTFPL | |
*/ | |
namespace CA; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Does a cURL request against a URL and returns only the Headers. | |
* If redirections occur, all Headers are returned for each Hop. | |
* | |
* By default, if not false, returned value is an array of arrays. | |
* If $associative is true, each set of Headers will be decoded into an associative array. | |
* If $only_last is true, regardless of the sets of Headers returned, only the last is kept. | |
* | |
* <code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Loads XML and kills namespaces in the process. | |
* It allows easy usage of namespaced XML code. | |
* | |
* - NameSpaced tags are renamed from <ns:tag to <ns_tag. | |
* - NameSpaced tags are renamed from </ns:tag> to </ns_tag>. | |
* - NameSpaced attributes are renamed from ns:tag=... to ns_tag=.... | |
* | |
* @license http://sam.zoy.org/wtfpl/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ------------------------------------------------------------------------------------------ // | |
/** | |
* LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |