This file contains hidden or 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
du -sh .git | |
git remote prune origin && git repack && git prune-packed && git reflog expire --expire=1.month.ago && git gc --aggressive | |
du -sh .git | |
From https://gitbetter.substack.com/p/how-to-clean-up-the-git-repo-and |
This file contains hidden or 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 | |
function icv_createVoteEvent($data) { | |
global $wpdb; | |
if (icv_insertVoteEvent($data)) { | |
icv_sendVoteOpenedEmail($wpdb->insert_id); | |
return true; | |
} | |
return false; | |
} |
This file contains hidden or 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
{ | |
"Statement": [ | |
{ | |
"Action": [ | |
"apigateway:*", | |
"cloudformation:CancelUpdateStack", | |
"cloudformation:ContinueUpdateRollback", | |
"cloudformation:CreateChangeSet", | |
"cloudformation:CreateStack", | |
"cloudformation:CreateUploadBucket", |
This file contains hidden or 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 | |
// From: https://stackoverflow.com/a/9773452/6001 | |
// Tell me the root folder path. | |
// You can also try this one | |
// $HOME = $_SERVER["DOCUMENT_ROOT"]; | |
// Or this | |
// dirname(__FILE__) | |
// This uses a ton of memory if you have lots of files. |
This file contains hidden or 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
/** | |
* Formats cat_num to display friendly version: | |
* 0000SSPP -> PP . int(0000) . SS | |
* | |
* @param string cat_num | |
* | |
* @return string Returns formatted string. | |
*/ | |
function format_cat_num($cat_num) | |
{ |