Skip to content

Instantly share code, notes, and snippets.

View deejroth's full-sized avatar

That Bearded Dev deejroth

View GitHub Profile
@deejroth
deejroth / united_states_datalist.html
Created April 4, 2020 16:51
An HTML datalist with the United States' states; with Abbreviations as Option values.
<input list="united_states" name="state" id="state" placeholder="State">
<datalist id="united_states">
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
@deejroth
deejroth / simple-json-reponse.php
Created March 15, 2018 02:07 — forked from james2doyle/simple-json-reponse.php
A simple JSON response function for PHP. Used in various PhileCMS plugins.
<?php
function json_response($message = null, $code = 200)
{
// clear the old headers
header_remove();
// set the actual code
http_response_code($code);
// set the header to make sure cache is forced
header("Cache-Control: no-transform,public,max-age=300,s-maxage=900");
@deejroth
deejroth / apigen.neon
Created May 9, 2015 01:11
apigen neon file example (apigen.neon)
# APIGen NEON file options with example
# You can also get a copy of these by running `apigen generate --help`
# Go here (http://ne-on.org/) for "validating" your neon file and learning about the language
# Quick note...true and false can be yes or no respectively...
# An array is made by creating a new line, tabbing over once, and using a hyphen to
# start the statement
# Strings do not need to be quoted (that I know of!?)
# Dirs or files documentation is generated for.
@deejroth
deejroth / Readme.md
Created July 11, 2014 16:24
Total Commander and Windows CLI batch file to open GitBash from source directory

Git Bash :: Open from specific directory (Total Commander)

I use Total Commander to open programs and files. Whilst using Node one day, I had a thought...can I make it open Node to my current working directory in TC? That answer was obviously "Yes!"; and so I also took on the task of creating the same thing for Git Bash.

How to use (Total Commander)

  1. Download this script to a place that you will remember it and it won't be moved
  2. Create a custom command in Total Commander
  • See the attached file usercmd.ini for the code
  1. Use the TC custom command in the TC Menu or add it as a button!
  2. And you're done!
@deejroth
deejroth / README.md
Last active August 29, 2015 14:03
Total Commander and Windows CLI batch file to open Node from source directory

Node Bash :: Open from specific directory (Total Commander)

I use Total Commander to open programs and files. Whilst using Node one day, I had a thought...can I make it open Node to my current working directory in TC? That answer was obviously "Yes!"; and so here we are.

How to use (Total Commander)

  1. Download this script to a place that you will remember it and it won't be moved
  2. Create a custom command in Total Commander
  • See the attached file usercmd.ini for the code
  1. Use the TC custom command in the TC Menu or add it as a button!
  2. And you're done!