Skip to content

Instantly share code, notes, and snippets.


bmaiyo briankip

  • Kenya
View GitHub Profile
briankip / Pluralizer.php
Last active Jul 4, 2017
from Illuminate\Support
View Pluralizer.php
use Doctrine\Common\Inflector\Inflector;
class Pluralizer
* Uncountable word forms.
* @var array
View blisinterface.ini
;************************** BLIS INTERFACE CLIENT CONFIGURATION FILE **********************************************
;This is the main configuration file for C4G BLIS Interface Client.
;BLIS Interface Client is a very lightweight client for Interfacing BLIS with external systems using Protocols like
;RS232 Serial Port,TCP/IP, HTTP
; C4G BLIS Equipment Interface Client
; Project funded by PEPFAR
briankip /
Last active Sep 1, 2020
A short introduction to binwalk


Binwalk is a simple linux tool for analysing binary files for embeded files and executable code. It is mostly used to extract the content of firmware images.


On kali linux, binwalk is already installed. On ubuntu you can do apt-get install binwalk or you can go to and follow the instructions.


View ssss
int main()
char *str = "blablabla";
char c = 'H';
size_t len = strlen(str);
char *str2 = malloc(len + 1 + 1 ); /* one for extra char, one for trailing zero */
strcpy(str2, str);
str2[len] = c;
str2[len + 1] = '\0';
View myftpc.c
#include <stdio.h>
#include <stdlib.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <string.h>
#include <netdb.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
View myftpd.c
#define QUEUE 1 //Queue for incoming connections
#define BUFFLENGTH 512 //Send buffer length
briankip /
Created May 7, 2015
python script for reading from windows serial
#/usr/bin/env python
import serial
bytesize=serial.EIGHTBITS; #EIGHT BITS
parity=serial.PARITY_NONE; # ODD
stopbits=serial.STOPBITS_ONE; # 2 STOP BITS
briankip / SudokuSolve.cpp
Created May 4, 2015
PM Lee's C++ Sudoku Solver Souce Code.
View SudokuSolve.cpp
#include "stdio.h"
int InBlock[81], InRow[81], InCol[81];
const int BLANK = 0;
const int ONES = 0x3fe; // Binary 1111111110
int Entry[81]; // Records entries 1-9 in the grid, as the corresponding bit set to 1
int Block[9], Row[9], Col[9]; // Each int is a 9-bit array
briankip / wvdial.conf
Created Apr 1, 2015
Configuration for wvdial to work with safaricom modem
View wvdial.conf
[Dialer Defaults]
Phone = *99#
Username = saf
Password = data
Stupid Mode = 1
Dial Command = ATDT
Modem = /dev/ttyUSB0
Baud = 3600000
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
briankip /
Last active Aug 29, 2015
Python program for continually reading data from serial port and dumping it to file
#/usr/bin/env python
#Supposed mapping of sysmex KX-21 results output
import serial
import datetime
You can’t perform that action at this time.