Skip to content

Instantly share code, notes, and snippets.

View jbothma's full-sized avatar

JD Bothma jbothma

View GitHub Profile
@jbothma
jbothma / data-model.json
Last active March 6, 2021 12:43
Asylum Assist form data model
[
{
"question_id": "surname",
"answer": [
{
"language": "en",
"value": "Bothma"
},
{
"language": "fr",
@jbothma
jbothma / query.sql
Last active May 1, 2020 08:54
Populate Cargografias template from django-popolo SQL
select p.family_name as "Apellido",
p.given_name as "Nombre",
p.gender as "sexo",
'' as "cargoTipo",
'' as "cargoClase",
m.role as "cargoNominal",
o.name as "Organizacion",
'' as "parentOrg",
'' as "duracionCargo",
a.name as territorio,
@jbothma
jbothma / README.md
Last active February 23, 2020 16:58
Arch installation

Running on intallation media

Disable Secure Boot

Connect to WiFi

Run wpa_cli with -i wlan0 to make scan work - default p2p-... interface is not what we want.

Partition the disks

@jbothma
jbothma / keybase.md
Last active January 31, 2020 21:22
keybase proof

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@jbothma
jbothma / security.md
Created January 30, 2020 05:54
apartment security

Safety and security at Mortimer Gardens

There have been a few security incidents at Mortimer Gardens over the last year. Specifically, things stolen from an apartment, wheels stolen from a car, and break-ins to garages without very strong locks.

We are currently getting help from security professionals to understand what our weakest points are, and what our options are for making Mortimer Gardens even safer.

We have a several security systems

  • Gates with electronic tag access
  • Electric fence with alarm when shorted
@jbothma
jbothma / data.json
Last active September 3, 2019 13:43
example json
[{"financial_year.financial_year": 2019, "programme_number": "4", "programme": "Planning, Information and Assessment", "_count": 78, "value": 13144331000}, {"financial_year.financial_year": 2019, "programme_number.programme_number": "5", "programme_number.programme": "Educational Enrichment Services", "_count": 37, "value.sum": 7508789000}, {"financial_year.financial_year": 2019, "programme_number.programme_number": "2", "programme_number.programme": "Curriculum Policy, Support and Monitoring", "_count": 51, "value.sum": 1988959000}, {"financial_year.financial_year": 2019, "programme_number.programme_number": "3", "programme_number.programme": "Teachers, Education Human Resources and Institutional Development", "_count": 51, "value.sum": 1366199000}, {"financial_year.financial_year": 2019, "programme_number.programme_number": "1", "programme_number.programme": "Administration", "_count": 109, "value.sum": 496253000}]
@jbothma
jbothma / index.html
Last active March 20, 2019 13:55
d3 v4 treemap with wrapping
<!DOCTYPE html>
<meta charset="utf-8">
<head>
<title>Treemap layout (with labels)</title>
</head>
<style>
rect {
fill: cadetblue;
@jbothma
jbothma / DA provincial rep.sh
Created October 22, 2018 07:40
DA provincial representative query
curl 'https://website-api.da-io.net/graphql' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0' -H 'Accept: */*' -H 'Accept-Language: en-ZA,en-GB;q=0.8,en-US;q=0.5,en;q=0.3' --compressed -H 'Referer: https://www.da.org.za/contact' -H 'content-type: application/json' -H 'origin: https://www.da.org.za' -H 'Connection: keep-alive' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' --data '{"operationName":"submitStructureInfo","variables":{"location":{"lat":-33.9738745,"lon":18.461363600000027}},"query":"fragment PublicRepPart on PublicRep {\n firstname\n lastname\n email\n prefname\n title\n cellphone\n __typename\n}\n\nmutation submitStructureInfo($location: InputLatLng) {\n getWard(location: $location) {\n muni_shortname\n ward_code\n ward_num\n geometry\n people {\n electedCouncillor {\n ...PublicRepPart\n __typename\n }\n assignedCouncillors {\n ...PublicRepPart\n __typename\n }\n constiuencyHead {
@jbothma
jbothma / department_names.sql
Created October 19, 2018 11:42
vulekamali list of department names
\copy (select f.slug, s.name as sphere_name, g.name as government_name, d.vote_number, d.is_vote_primary, d.name as department_name from budgetportal_financialyear f, budgetportal_sphere s, budgetportal_government g, budgetportal_department d where d.government_id = g.id and g.sphere_id = s.id and s.financial_year_id = f.id order by f.slug desc, s.name, g.name, d.vote_number, d.is_vote_primary desc, d.name) to '/tmp/authoritative-department-names.csv' csv header;
@jbothma
jbothma / epre-subprogrammes-2018-19-from-jonathan.csv
Created October 8, 2018 15:39
epre-subprogrammes-2018-19-from-jonathan.csv
We can't make this file beautiful and searchable because it's too large.
government,department,Programme,Subprogramme,financial_year,budget_phase,amount
Eastern Cape,"Economic Development, Environmental Affairs And Tourism",Administration,Corporate Services,2018,Main appropriation,62040
Eastern Cape,"Economic Development, Environmental Affairs And Tourism",Administration,Corporate Services,2019,Medium Term Estimates,65199
Eastern Cape,"Economic Development, Environmental Affairs And Tourism",Administration,Corporate Services,2020,Medium Term Estimates,70164
Eastern Cape,"Economic Development, Environmental Affairs And Tourism",Administration,Financial Management,2018,Main appropriation,103528
Eastern Cape,"Economic Development, Environmental Affairs And Tourism",Administration,Financial Management,2019,Medium Term Estimates,111657
Eastern Cape,"Economic Development, Environmental Affairs And Tourism",Administration,Financial Management,2020,Medium Term Estimates,111197
Eastern Cape,"Economic Development, Environmental Affairs And Tourism",Administration,Office of the HOD,201