Skip to content

Instantly share code, notes, and snippets.

bmaiyo briankip

  • Kenya
Block or report user

Report or block briankip

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
@briankip
briankip / mpesa-tarrifs.md
Last active Aug 29, 2015
M-Pesa, zuku and kplc payment via mpesa tariffs.
View mpesa-tarrifs.md

A single place to find most charges related to m-pesa

MPESA TARIFFS

Min Max Registered Unregistered Via Agent
10 49 1 N/A N/A
50 100 3 N/A 10
101 500 11 66 27
501 1,000 15 66 27
@briankip
briankip / equity-tariffs.md
Created Sep 3, 2014
Equity Bank kenya agency tariffs
View equity-tariffs.md
Withdrawal amount Charges
< 2,500 25
2,501 - 5,000 45
5,001 - 10,000 75
10,001 - 20,000 145
20,001 - 35,000 170
35,001 - 50,000 195
50,001 - 100,000 225
@briankip
briankip / linkgitcode.md
Last active Aug 29, 2015
Linking to lines or chunks of code on github.
View linkgitcode.md

So you want to link to a line or chunk of code this is how you do it.

  1. Go to the file you are talking about, if you are viewing a number of files click to view the specific file.
  2. To select one line go to the gutter (where the line numbers are) and click the number, it will highlight in yellow.
  3. For multiple lines select the starting line as above then select shift click the end line. It will highlight the entire chuck of code.
  4. The URL will have automatically changed if you noticed, but this is not the canonical URL as when commits continue and the line numbers shift do to addition of code, sooner or later the URL will be pointing to something completely different.
  5. To prevent this hit Y and you will get the permanent canonical URL to the commit.
  6. Now the address bar has the permanent link to that chunk/line of code.
@briankip
briankip / PatientsTableMigrations.sql
Created Jan 7, 2015
Migration script for the patients table
View PatientsTableMigrations.sql
-- Script to migrate patients data from old-blis to new blis
-- 0 warnings
-- Some records have no calculatable date of birth, I have put the DOB as the timestamp
insert into iblis.patients
(patient_number, name, dob, gender, external_patient_number, created_at)
select patient_id, name,
(case WHEN dob = '0000-00-00'
@briankip
briankip / migrations.sql
Last active Aug 29, 2015
All migration scripts fro old blis to new blis
View migrations.sql
-- RUN THESE ONLY ONCE
-- INDEXING TEST TABLE
-- Helps improve performance
alter table blis_301.test add index (external_lab_no);
-- PRELIMINARY MIGRATION BEFORE MIGRATING REJECTION REASONS AND SPECIMEN
@briankip
briankip / baudrate.py
Created Feb 3, 2015
Baudrate detection for serial devices
View baudrate.py
#!/usr/bin/env python
import sys
import time
import serial
from threading import Thread
class RawInput:
"""Gets a single character from standard input. Does not echo to the screen."""
def __init__(self):
@briankip
briankip / minicom.conf
Last active Aug 29, 2015
Minicom config file
View minicom.conf
########################################################################
# Minicom configuration file - use "minicom -s" to change parameters.
pu port /dev/ttyS0
pu baudrate 9600
pu bits 8
pu parity N
pu stopbits 1
pu rtscts No
########################################################################
@briankip
briankip / sysmex.txt
Created Feb 3, 2015
Sysmex dump file
View sysmex.txt
14/ 7/1617:34 000000000007Zÿÿÿÿÿÿ 3Ý7°ù9XWY8Ý-¨g2q 5.1 2.21 5.5 17.6 79.6 24.9 31.3 88 34.3 8.9 56.8 1.7 0.5 2.9 22.1 55.7 16.8 10.3 30.6 62.5154.9 ----- ++ EdbA"#3DRSNG9)!8Q_d^P?4)  3N^ddYLE</&  &+8EYddddd11  C10 U£
@briankip
briankip / sysmexdeamon.sh
Created Feb 3, 2015
Deamon for the sysmex machine
View sysmexdeamon.sh
#!/bin/bash
nohup cat /dev/ttyS0 > /var/www/sysmex/sysmex.dump
View celtac.sh
#!/bin/bash
stty -F /dev/ttyS0 19200 parenb
cat /dev/ttyS0 >| /var/www/celtac/celtac-results.txt
You can’t perform that action at this time.