Skip to content

Instantly share code, notes, and snippets.

James Valentine f13dev

Block or report user

Report or block f13dev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
f13dev / eliquid.txt
Last active Apr 3, 2019
HP 39/40 Eliquid mixing calculator. Copy this code to a new program in your calculator and then when ran you are asked to enter: A VG ratio, A concentrate nicotine strength, A desired nicotine strength, A flavour percentage and the quantity to make. You will be presented with the required quantities. This assumes that your flavour and nicotine i…
View eliquid.txt
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)");
f13dev / tomcat_start
Last active Sep 18, 2016
Bash script to start and/or stop Apache Tomcat on MacOS. Place these files in "/usr/local/bin" and mark each executable using "chmod +x filename".
View tomcat_start
#Start tomcat
/Library/Tomcat/bin/ &>/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)
View wp-api.class.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
f13dev / getLinksFromTwitterText.php
Last active Jun 29, 2016
Converts a plain text Twitter tweet into html to <a> tags for URLs, #links and @links
View getLinksFromTwitterText.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)
You can’t perform that action at this time.