Skip to content

Instantly share code, notes, and snippets.

View jalbertbowden's full-sized avatar

albert jalbertbowden

View GitHub Profile
@jalbertbowden
jalbertbowden / query.php
Created August 30, 2019 18:08
ms sql thinks my code sucks.
<?php /** api endpoint - schedules **/
include("includes/sqlsrv.php");
header('Content-Type: application/json, charset=UTF-8');
$conn = sqlsrv_connect( $server_name, $connection_info); /* open the connection */
/* catch and display any connection error message */
if( $conn === false ) {
echo '<p>Unable to connect.</p>';
die( print_r( sqlsrv_errors(), true));
}
@jalbertbowden
jalbertbowden / query.js
Last active August 30, 2019 17:34
moar ms sql fail by me
function passSQL(url, jsonSchedulesURIVar, htmlSelectAgenciesValue, queryFor){
var http = new XMLHttpRequest();
var data = new Object();
data.schedule = jsonSchedulesURIVar;
data.agency = htmlSelectAgenciesValue;
var jsonString= JSON.stringify(data);
http.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
console.log(this.response);
};
@jalbertbowden
jalbertbowden / query.js
Created August 30, 2019 13:55
ms sql thinks i'm a douchbag.
if(scheduleAgencyLocalityVar === 4){ // state agency
jsonSchedulesURIVar = 4;
jsonSchedulesURIVar = jsonSchedulesURIVar.toString();
queryFor = "state";
} else if(scheduleAgencyLocalityVar === 5){ // locality/entity
jsonSchedulesURIVar = 5;
jsonSchedulesURIVar = jsonSchedulesURIVar.toString();
queryFor = "locality";
}
var sqlStatementSchedules = "'SELECT DISTINCT SchedNum, SchedTitle FROM RM3_Schedules WHERE FK_SCHEDULE_TYPE_ID = "+jsonSchedulesURIVar+" OR FK_AGENCY_LOCALITY_ID = "+htmlSelectAgenciesValue+" ORDER BY SchedTitle;'";
@jalbertbowden
jalbertbowden / webkit-pseudo-elements.md
Created August 23, 2019 21:59 — forked from leostratus/webkit-pseudo-elements.md
Webkit Pseudo-Element Selectors (Shadow DOM Elements)

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;

@jalbertbowden
jalbertbowden / php.ini
Created August 18, 2019 01:29 — forked from adrienne/php.ini
PHP .ini file
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@jalbertbowden
jalbertbowden / map.geojson
Last active August 12, 2019 21:55
TIF District Parcels Map, Richmond, Virginia
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jalbertbowden
jalbertbowden / map.geojson
Last active August 12, 2019 21:55
Parts of TIF District in Richmond, Virginia being used for negotiating around a new Richmond Coliseum.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jalbertbowden
jalbertbowden / map.geojson
Last active August 12, 2019 21:24
Richmond Coliseum TIF Deal - Parcels with PIN IDs beginning with N
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jalbertbowden
jalbertbowden / map.geojson
Last active August 12, 2019 16:50
TIF Coliseum Parcels - Richmond, Virginia
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jalbertbowden
jalbertbowden / REST_PHP_get_entry_list_example.php
Created August 10, 2019 16:21 — forked from sugarknowledge/REST_PHP_get_entry_list_example.php
PHP Example using cURL with the v4 SOAP API to retrieve a list of records with get_entry_list
<?php
$url = "http://{site_url}/service/v4/rest.php";
$username = "admin";
$password = "password";
//function to make cURL request
function call($method, $parameters, $url)
{
ob_start();