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 | |
/** | |
* Takes a string argument, which may include URLs, twitter #links or twitter @links, | |
* imbeds html <a> tags into the string and returns it. | |
* | |
* @param [type] $string [description] | |
* @return [type] $string [description] | |
*/ | |
function getLinksFromTwitterText($string) | |
{ |
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 wordpress_pluing_information | |
{ | |
// Variable to store plugin name | |
var $slug; | |
var $results; | |
function wordpress_pluing_information($aSlug) | |
{ | |
// Set the pluignName of the new object to the argument |
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
#Start tomcat | |
/Library/Tomcat/bin/startup.sh &>/dev/null &disown | |
#print message | |
printf "\n\nStarting apache tomcat\n" | |
#sleep for 5 seconds | |
sleep 5 | |
#Check if tomcat has started (localhost:8080 should succeed) |
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
EXPORT ELIQUID() | |
BEGIN | |
LOCAL DP = 2) | |
INPUT(V,"VG percentage"); | |
INPUT(N,"Concentrate nicotine mg/ml"); | |
INPUT(D,"Desired nicotine mg/ml"); | |
INPUT(F,"Flavour percentage"); | |
INPUT(M,"Quantity to make (ml)"); | |
PRINT(); |
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 | |
function currencyConvert($from,$amount,$to) { | |
// Initiate curl | |
$curl = curl_init(); | |
// Set the curl URL and options | |
curl_setopt($curl, CURLOPT_URL, 'https://api.exchangeratesapi.io/latest?base=' . $from); | |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); | |
// Get the output from the curl request | |
$output = curl_exec($curl); | |
// Decode the output |