Skip to content

Instantly share code, notes, and snippets.

albert jalbertbowden

Block or report user

Report or block jalbertbowden

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
View name-that-key.jquery.js
function topKey(keys, chords) {
var counts = {},
result = [];
_(keys).each(function(values, key, list) {
counts[key] = _(values).chain().intersection(this.chords).size().value()
}, {
chords: chords
});
var max = _(counts).max();
return _(counts).each(function(value, key, list) {
@jalbertbowden
jalbertbowden / query.php
Created Aug 30, 2019
ms sql thinks my code sucks.
View query.php
<?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 Aug 30, 2019
moar ms sql fail by me
View query.js
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 Aug 30, 2019
ms sql thinks i'm a douchbag.
View query.js
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 Aug 23, 2019 — forked from afabbro/webkit-pseudo-elements.md
Webkit Pseudo-Element Selectors (Shadow DOM Elements)
View webkit-pseudo-elements.md

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 Aug 18, 2019 — forked from adrienne/php.ini
PHP .ini file
View php.ini
[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 Aug 12, 2019
TIF District Parcels Map, Richmond, Virginia
View map.geojson
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 Aug 12, 2019
Parts of TIF District in Richmond, Virginia being used for negotiating around a new Richmond Coliseum.
View map.geojson
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 Aug 12, 2019
Richmond Coliseum TIF Deal - Parcels with PIN IDs beginning with N
View map.geojson
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 Aug 12, 2019
TIF Coliseum Parcels - Richmond, Virginia
View map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.