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
/** | |
* Prevent use of 'CTRL+v' or 'CTRL+V' in form fields that must not be copied. | |
* This doesn't prevent browser native auto complete (e.g. double-clicking into a field) or vendor specific mobile device features. | |
* | |
* Example use case: Repeating fields for email, or password. | |
* | |
* @param {object} event Keydown event. | |
*/ | |
function preventCopyPaste (event) { | |
'use strict'; |
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
/** | |
* General game engine helper and basic math functionality. | |
* Set a stage object reference before using any of the methods. | |
*/ | |
package com | |
{ | |
import flash.display.MovieClip; | |
import flash.display.Stage; | |
public class $ |
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 | |
/** | |
* Return parts of the $GLOBALS array sorted by type. | |
* It's recommended to not return all at once as this might run out of memory. | |
*/ | |
foreach (array_keys($GLOBALS) as $key) { | |
switch (gettype($GLOBALS[$key])) { | |
case 'array': { | |
debug(array_keys($GLOBALS[$key])); |
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 | |
/** | |
* Set default CHMOD if you completely messed up a setup. | |
* By default the Contao CMS setup should reset the CHMOD. | |
* | |
* Copy to web root and run from a webbrowser. | |
* | |
* @param string $dir Base directory | |
* @param octal $dirModes Directory CHMOD | |
* @param octal $fileModes File CHMOD |
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
#!/bin/sh | |
# Repair or restore Magento shop CHMOD settings. | |
# There are some custom files and issue fixes incorporated. | |
# | |
# Tested with Magento CE 1.5.1.0 - 1.6.1.0. | |
# Run this script with 'chmod o+x' applied. | |
# -------------------------------------------------------------------------------------------------------------- Select folder, Startup info |
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 | |
/** | |
* A few different ways to do debugging and logging in Magento. | |
* The output is spare - specific extensions are recommended. | |
*/ | |
# -------------------------------------------------------------------------------------------------------------------------------- Debugging | |
// \app\code\core\Mage\Core\functions.php | |
mageDebugBacktrace(false, true, true); |
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
-- Fast switch all store URLs and cookie settings. | |
-- | |
-- Useful to synchronize a live DB to a DEV environment. | |
-- Make sure to change multi-store URLs manually after applying this script. | |
-- | |
-- Tested with: | |
-- Magento CE 1.4 - 1.6 | |
-- ------------------------------------------------------------------------------------------------------------------------------ Store URLs |
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 | |
/** | |
* Reformat debug backtrace messages to a more simple and readable format. | |
* Output only the required information (setup as needed). | |
*/ | |
class Debug_Backtrace_Helper | |
{ | |
/** | |
* Run method on class instance call. | |
* |
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
#!/bin/bash | |
# - Angular | |
# - Apache | |
# - Composer | |
# - Docker | |
# - Git | |
# - Keys | |
# - MySQL | |
# - PHP |
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
------------------------------------------------------------------------------------------------------------------------------------ General | |
# Recursively search through all folders and file contents. | |
# Note: It also searches in binary files. Change the command or limit it to code folders. | |
grep -lir 'example' . | |
# Limit search to PHP files only. | |
grep --include '*.php' -lir 'example' . | |
OlderNewer