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 | |
$raw_email = <<<TEST | |
Tizag.comi $100 | |
Webmaster Tutorials | |
Unlock your potential! | |
TEST; | |
echo $raw_email; | |
exec("EMAIL=" . escapeshellarg($raw_email) . "; echo \"\$EMAIL\";", $result); | |
print_r($result); |
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 | |
# | |
# This command expects to be run within the Open Atrium profile directory. To | |
# generate a full distribution you it must be a CVS checkout. | |
# | |
# To use this command you must have `drush make`, `cvs` and `git` installed. | |
# | |
if [ -f openatrium.make ]; then | |
echo "\nThis command can be used to run openatrium.make in place, or to generate" |
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 | |
# | |
# Build a complete tar.gz archive of Drupal + Open Atrium | |
# | |
# This command expects to be run withing a CVS checkout of the Open Atrium | |
# project. It can only be run without arguments. It will generate a output file | |
# of the format openatrium-TAG.tar.gz in the current directory. | |
# | |
MAKE=$(cat <<EOF |
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 | |
$padId = 'testingmoreplease'; | |
$domain = "http://piratepad.net"; | |
$ch = curl_init(); | |
# for debugging | |
curl_setopt($ch, CURLOPT_HEADER, 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
function etherpad_field_settings($op, $field) { | |
switch ($op) { | |
// Code removed. | |
case 'database columns': | |
return array( | |
'etherpad_url' => array('type' => 'varchar', 'length' => 1024, 'not null' => FALSE,), | |
'etherpad_text' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), | |
'attributes' => array('type' => 'text', 'size' => 'medium', 'not null' => FALSE),// Then add auto-generate etherpad function. | |
); | |
} |
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
/** | |
* Implementation of hook_widget(). | |
*/ | |
function etherpad_widget(&$form, &$form_state, $field, $items, $delta = 0) { | |
$element['etherpad_url'] = array( | |
'#type' => 'value', | |
'#value' => (isset($items[$delta]['etherpad_url']) && !empty($form['nid']['#value'])) ? $items[$delta]['etherpad_url'] : $field['etherpad_url'] . etherpad_generate_padid($field['etherpad_url']), | |
); | |
$element['etherpad_text'] = array( | |
'#type' => '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
#!/bin/bash | |
# Usage: onchange.sh COMMAND FILE | |
# On Ubuntu/Debian, you'll need to install the inotify-tools package. | |
COMMAND=$1 | |
FILE=$2 | |
# Run once initially. | |
$command $file |
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
app.get '/groups', (req, res) -> | |
Group = mongoose.model 'group' | |
Group.find (err, groups) -> | |
if err then console.error err | |
res.json groups |
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
$ = jQuery | |
$.fn.makeExpandingArea = () -> | |
@.each -> | |
container = $(@) | |
area = container.find('textarea') | |
span = container.find('span') | |
area.on 'input', -> | |
span.text(area.val()) |
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
# install git | |
sudo apt-get install g++ curl libssl-dev apache2-utils make | |
sudo apt-get install git-core | |
# download the Node source, compile and install it | |
cd /opt | |
git clone https://github.com/joyent/node.git | |
cd node | |
git checkout v0.6 | |
./configure |
OlderNewer