Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
#!/bin/bash | |
function jsonval { | |
temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop` | |
echo ${temp##*|} | |
} | |
json=`curl -s -X GET http://twitter.com/users/show/$1.json` | |
prop='profile_image_url' | |
picurl=`jsonval` |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
/** | |
* August 1, 2012 | |
* | |
* Jeff Bickart | |
* Twitter: @bickart | |
* Blog: http://sugarcrm-dev.blogspot.com/ | |
* | |
* The following is a example of usage of the tincheck.com web-service to test the ValidateTinName |
select (mytext ~ '^([0-9]+[.]?[0-9]*|[.][0-9]+)$'); |
#!/bin/bash | |
version=1.0.1 | |
versionDate="2014-02-14" | |
function showHelp() { | |
echo "watchfile - monitor file(s)/command and perform action when changed | |
Possible ways of usage | |
---------------------------------------- |
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
#!/usr/bin/python | |
""" | |
Create a stage in your project, make it the last stage. | |
Make a task in the stage with this inline script: | |
#! /bin/bash | |
/some/path/bamboo-to-slack.py "${bamboo.planKey}" "${bamboo.buildPlanName}" "${bamboo.buildResultsUrl}" |
FROM sdhibit/rpi-raspbian | |
RUN apt-get update && apt-get install -y netcat-openbsd | |
RUN echo 'HTTP/1.1 200 OK' >> www | |
RUN echo 'Content-Type: text/html' >> www | |
RUN echo >> www | |
RUN echo '<h1>Hello <i>world!</i></h1>' >> www | |
EXPOSE 9999 | |
CMD ["/bin/bash", "-c", "while true ; do nc -l 9999 < www > /dev/null ; done"] |