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
cp -f -R "${BUILT_PRODUCTS_DIR}/${APPLICATION_NAME}" "/some/folder" | |
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
// hacky sort of way to pass parameters into action functions | |
// | |
static function Action( $name, $value ) { | |
return function() use( $name, $value) { | |
Log( "vlaue", $name, $value ); | |
}; | |
} | |
static public function Add( $name, $value ) { | |
add_action( 'admin_head', self::Action( $name, $value )); |
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
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
// useage, await sleep(2000): | |
// | |
async function demo() { | |
console.log('Taking a break...'); | |
await sleep(2000); | |
console.log('Two second later'); |
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
var browser = ''; | |
var browserVersion = 0; | |
if (/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent)) { | |
browser = 'Opera'; | |
} else if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { | |
browser = 'MSIE'; | |
} else if (/Navigator[\/\s](\d+\.\d+)/.test(navigator.userAgent)) { | |
browser = 'Netscape'; |