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
import Foundation | |
import SwiftUI | |
class AppDelegate: NSObject, UIApplicationDelegate { | |
func application(_ application: UIApplication, | |
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil | |
) -> Bool { | |
customizeNavigationBarAppearance() | |
} | |
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
diff -ruN php-8.2.1/ext/date/lib/parse_date.c php-8.2.1-gh10218/ext/date/lib/parse_date.c | |
--- php-8.2.1/ext/date/lib/parse_date.c 2023-01-03 13:40:55.000000000 -0500 | |
+++ php-8.2.1-gh10218/ext/date/lib/parse_date.c 2023-01-17 06:37:01.121532677 -0500 | |
@@ -787,7 +787,7 @@ | |
(**ptr >= 'A' && **ptr <= 'Z') || | |
(**ptr >= 'a' && **ptr <= 'z') || | |
(**ptr >= '0' && **ptr <= '9') || | |
- **ptr == '/' || **ptr == '_' || **ptr == '-' | |
+ **ptr == '/' || **ptr == '_' || **ptr == '-' || **ptr == '+' | |
) { |
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
sudo -u www-data \ | |
SCRIPT_NAME=/status \ | |
SCRIPT_FILENAME=/status \ | |
REQUEST_METHOD=GET \ | |
QUERY_STRING=full \ | |
cgi-fcgi -bind -connect /var/run/php/php7.0-fpm.sock |
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
sudo strace -f -tt -o /tmp/php.trace -s1024 -p `pgrep -f php-fpm | tr '\n' ','` |
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
# see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ | |
# core | |
brew install coreutils | |
# key commands | |
brew install binutils | |
brew install diffutils | |
brew install ed --default-names | |
brew install findutils --with-default-names |
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 | |
/** | |
* Generate image thumbnail on the fly | |
*/ | |
public function thumbnailAction() | |
{ | |
$file = $this->getRequest()->getParam('file'); | |
$file = Mage::helper('cms/wysiwyg_images')->idDecode($file); | |
$thumb = $this->getStorage()->resizeOnTheFly($file); | |
if ($thumb !== false) { |
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 | |
class SomeTestTest extends MageTest_PHPUnit_Framework_TestCase | |
{ | |
/** | |
* @param string $observerName e.g. mymodulens_mymodule_does_something_on_order_place | |
* @param string $eventName e.g. a dispatched event e.g. sales_order_place_after | |
* @param string $area e.g. global/frontend/admin/adminhtml | |
*/ | |
public function assertObserverReceivesEvent($observerName, $eventName, $area) |
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
"/Users/aaron/Sites" 192.168.200.100 -alldirs -mapall=501:20 |
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
#!/usr/bin/env bash | |
find . -name '*.gz' -print | while read SRC_FILE; do | |
DEST_FILE=$(echo $SRC_FILE | sed 's/_2014.*.sql.gz/.sql.gz/') | |
mv $SRC_FILE $DEST_FILE | |
done |
NewerOlder