Skip to content

Instantly share code, notes, and snippets.

@pjaudiomv
pjaudiomv / index.html
Created August 26, 2018 03:27
SB Meeting Search
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://bmlt.sezf.org/main_server/local_server/bmlt.js"></script>
<a id="Day1" href="javascript:selectDay(1)">Sunday</a>
<a id="Day2" href="javascript:selectDay(2)">Monday</a>
<a id="Day3" href="javascript:selectDay(3)">Tuesday</a>
<a id="Day4" href="javascript:selectDay(4)">Wednesday</a>
<a id="Day5" href="javascript:selectDay(5)">Thursday</a>
<a id="Day6" href="javascript:selectDay(6)">Friday</a>
<a id="Day7" href="javascript:selectDay(7)">Saturday</a>
<hr/>
@pjaudiomv
pjaudiomv / getCheckKeysBMLT.php
Last active November 13, 2018 23:17
Get and check api keys form all know bmlt root servers
<?php
$rootServerList = json_decode(file_get_contents('https://raw.githubusercontent.com/LittleGreenViper/BMLTTally/master/rootServerList.json'), true);
foreach ($rootServerList as $rootServer) {
echo "<strong>Name:</strong> " . $rootServer['name'] . "<br>";
echo "<strong>Root URL:</strong> " . $rootServer['rootURL'] . "<br>";
echo "<strong>Google API Key:</strong> ";
$getGkeys = json_decode(file_get_contents($rootServer['rootURL'] . 'client_interface/json/?switcher=GetServerInfo'), true);
for ( $i = 0; $i < count( $getGkeys ); $i++ ) {
echo $getGkeys[$i]['google_api_key'] . "<br>";
@pjaudiomv
pjaudiomv / bmlt_jsonp_datatable.html
Created November 14, 2018 06:21
BMLT Meetings with JSONP and DataTables in jQuery
<!DOCTYPE html>
<html>
<head>
<title>BMLT Meetings with JSONP and DataTables in jQuery</title>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css">
</head>
<body>
<div id="content"style="width:95%">
<?php
$root_server = "https://your_bmlt_server.org/main_server";
$counties = json_decode(file_get_contents($root_server . "/client_interface/json/?switcher=GetFieldValues&meeting_key=location_sub_province"), true);
$countiesArray = array();
foreach ($counties as $county) {
$countiesArray[] = $county['location_sub_province'];
}
@pjaudiomv
pjaudiomv / MeetingNames.php
Last active January 6, 2019 15:01
Get and count top 20 meeting names in tomato
<?php
$tomatoEndpoint = 'https://tomato.na-bmlt.org/main_server/client_interface/json/?switcher=GetSearchResults&data_field_key=meeting_name';
$meetingNames = json_decode(file_get_contents($tomatoEndpoint), true);
$meetings = array();
foreach ($meetingNames as $key => $value) {
// do a tiny bit of cleanup
$meetings[] = str_replace(' GROUP', '', trim(strtoupper($value['meeting_name'])));
@pjaudiomv
pjaudiomv / meetingsByDayLocation.html
Last active January 14, 2019 02:20
meetings By Day By Current Location
<!DOCTYPE html>
<html>
<head><meta charset="utf-8"/></head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://bmlt.sezf.org/main_server/local_server/bmlt.js"></script>
<a id="Day1" href="javascript:selectDay(1)">Sunday</a>
<a id="Day2" href="javascript:selectDay(2)">Monday</a>
<a id="Day3" href="javascript:selectDay(3)">Tuesday</a>
<?php
// Get all Counties for the following state, AL, FL, GA, NC, SC
$al_file = "http://www2.census.gov/geo/docs/reference/codes/files/st01_al_cou.txt";
$fl_file = "https://www2.census.gov/geo/docs/reference/codes/files/st12_fl_cou.txt";
$ga_file = "https://www2.census.gov/geo/docs/reference/codes/files/st13_ga_cou.txt";
$nc_file = "https://www2.census.gov/geo/docs/reference/codes/files/st37_nc_cou.txt";
$sc_file = "https://www2.census.gov/geo/docs/reference/codes/files/st45_sc_cou.txt";
$states = array($al_file, $fl_file, $ga_file, $nc_file, $sc_file);
<?php
// Get all Counties for the following state, AL, FL, GA, NC, SC
$al_file="http://www2.census.gov/geo/docs/reference/codes/files/st01_al_cou.txt";
$fl_file="https://www2.census.gov/geo/docs/reference/codes/files/st12_fl_cou.txt";
$ga_file="https://www2.census.gov/geo/docs/reference/codes/files/st13_ga_cou.txt";
$nc_file="https://www2.census.gov/geo/docs/reference/codes/files/st37_nc_cou.txt";
$sc_file="https://www2.census.gov/geo/docs/reference/codes/files/st45_sc_cou.txt";
$states = array($al_file, $fl_file, $ga_file, $nc_file, $sc_file);

Keybase proof

I hereby claim:

  • I am pjaudiomv on github.
  • I am pjaudiomv (https://keybase.io/pjaudiomv) on keybase.
  • I have a public key ASD4fv77svkEtEiJxr9lZGEY_7ABp3lsLNd_vx1j2reF6wo

To claim this, I am signing this object:

@pjaudiomv
pjaudiomv / repos.html
Created August 3, 2019 17:49
BMLT GitHub Org Repos
<!DOCTYPE html>
<html>
<head>
<title>BMLT GitHub Org Repos</title>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css">
<style>
table.dataTable tbody, thead {
font: normal normal normal 14px/1.3em "open sans",sans-serif;