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
| url="http://api.wolframalpha.com/v2/query" | |
| appid="YOUR APP ID" # get one at https://developer.wolframalpha.com/portal/apisignup.html | |
| query="$@" | |
| value="$(perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$query")" | |
| echo "Computing: $query" | |
| curl -s -L -G -d "input=$value&appid=$appid&format=plaintext" $url >/tmp/wolfram-alpha.xml | |
| xsltproc ~/Scripts/wolf.xslt /tmp/wolfram-alpha.xml |
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 | |
| /** | |
| * Implement of drush_hook_COMMAND_validate(). | |
| * | |
| * Prevent catastrophic sql-sync to live. Note that this file has to be local to the | |
| * machine that intitiates sql-sync command. | |
| */ | |
| function drush_policy_sql_sync_validate($source = NULL, $destination = NULL) { | |
| if (strstr($destination, '.live')) { |