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 deleteAction extends sfAction | |
{ | |
public function execute($request) | |
{ | |
if ($request->isMethod('post')) { | |
$fhr = MyModelQuery::create()->findPk($this->getRequestParameter('id')); | |
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 | |
// not opening the popup again after submitting | |
class skillEditAction extends simpleWidgetEditAction | |
{ | |
public function execute($request) | |
{ | |
if ($request->isMethod('post')) { | |
if ($this->processPostData()) { | |
$result = array( |
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 | |
/* | |
* @author Radu Topala <[email protected]> | |
*/ | |
class User | |
{ | |
protected $id; |
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 MyModelPeer extends BaseMyModelPeer { | |
public static function getStats($id) | |
{ | |
//use $id for something | |
$stats['company1']['product1'] = array('items'=>5, 'price'=>5*10); | |
$stats['company1']['product2'] = array('items'=>9, 'price'=>9*2); |
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 | |
find . -name .svn -print0 | xargs -0 rm -r | |
paths=`git ls-files --deleted` | |
for path in $paths | |
do | |
echo ${path} to be removed | |
git rm -r $path |
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 -dmemory_limit=-1 /usr/bin/composer update --lock |
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 | |
echo ‘LC_ALL=en_US.UTF-8’ > /etc/environment | |
echo ‘LANG=en_US.UTF-8’ >> /etc/environment | |
apt-get install -y python-software-properties | |
add-apt-repository -y ppa:ondrej/php5-oldstable | |
apt-get update -y && apt-get -y upgrade && apt-get -y dist-upgrade | |
apt-get install -y php5 | |
apt-get install php5-cli | |
apt-get install -y curl apache2 git php5-curl php5-intl |
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 | |
echo ‘LC_ALL=en_US.UTF-8’ > /etc/environment | |
echo ‘LANG=en_US.UTF-8’ >> /etc/environment | |
apt-get update -y && sudo apt-get -y dist-upgrade | |
apt-get install -y curl | |
apt-get install -y apache2 | |
apt-get install -y php5 | |
apt-get install php5-cli | |
apt-get install -y git |
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 parser = require('html2hscript'), | |
redis = require("redis"), | |
client = redis.createClient(), | |
util = require('util'), | |
diff = require('virtual-dom/diff'), | |
patches, content, oldTree = ''; | |
client.on("error", function (err) { | |
console.log("Error " + err); | |
}); |
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
package main | |
import ( | |
"fmt" | |
"io" | |
"os" | |
s "strings" | |
"github.com/kr/fs" | |
) |
OlderNewer