- Issue the following commands from the command line in your Yii application directory:
chmod +x psyii
mkdir extensions/yiishell
wget -O extensions/yiishell/psysh psysh.org/psysh
chmod +x extensions/yiishell/psysh
- Copy the file
init.php
below topsysh/init.php
and update any paths to work with your application configuration - Copy the file
config.php
below topsysh/config.php
. Change or add to the config array with the options you'd like to use (available options) - Now you can start PsySH with the command
./psyii psysh/init.php --config psysh/config.php
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
heap_start .equ 0x9000 ; Starting address of heap | |
heap_size .equ 0x0100 ; Number of bytes available in heap | |
.org 0 | |
jp main | |
.org 0x100 | |
main: | |
ld HL, 0x8100 |
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 | |
/** | |
* Easy remote HTTP requests using a single function | |
* (How curl probably SHOULD have been written originally) | |
* | |
* If you need something more advanced/robust, use 'guzzle' | |
* But this function is useful for when you don't need a massive library, | |
* but rather something simpler and more lightweight | |
* | |
* Examples: |
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
ps aux | grep deploy | tr -s " " | cut -d " " -f2 | xargs kill | |
ps aux | grep lldb | tr -s " " | cut -d " " -f2 | xargs kill | |
sudo npm update | |
sudo npm uninstall cordova ionic ios-sim ios-deploy | |
sudo npm install -g cordova ionic ios-sim ios-deploy | |
cordova platform rm ios | |
cordova platform add ios | |
ionic prepare ios | |
ionic state reset | |
ionic state restore |
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 prefered_language($available_languages, $http_accept_language) { | |
$available_languages = array_flip($available_languages); | |
$langs = array(); | |
preg_match_all('~([\w-]+)(?:[^,\d]+([\d.]+))?~', strtolower($http_accept_language), $matches, PREG_SET_ORDER); | |
foreach($matches as $match) { | |
Windows is really horrible system for developers and especially for devops. It doesn’t even have a usable terminal and shell, so working with command line is really pain in the ass. If you really don’t want to switch to any usable system (OS X, Linux, BSD…), then this guide should help you to setup somewhat reasonable environment – usable terminal, proper shell, ssh client, git and Sublime Text as a default editor for shell.
- Download and install Git for Windows* with:
- [✘] Use Git from the Windows Command Prompt
- [✘] Checkout as-is, commit Unix-style line endings
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
<!--[if mso]> | |
<center> | |
<table><tr><td width="580"> | |
<![endif]--> | |
<div style="max-width:580px; margin:0 auto;"> | |
<p>This text will be centered and constrained to 580 pixels even on Outlook which does not support max-width CSS</p> | |
</div> | |
<!--[if mso]> |
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 | |
/** | |
* Copyright © 2011 Erin Millard | |
*/ | |
/** | |
* Returns the number of available CPU cores | |
* | |
* Should work for Linux, Windows, Mac & BSD |