Skip to content

Instantly share code, notes, and snippets.

View rapando's full-sized avatar
👨‍💻
If you have an open source project, hit me up.

Samson Rapando rapando

👨‍💻
If you have an open source project, hit me up.
View GitHub Profile
@rapando
rapando / add_polynomials.c
Last active July 1, 2018 18:04
Add two polynomials with a C program
/*
Rapando C Samson
A Program that adds two polynomials in an array and displays the result
Sat Oct 3rd 2015
*/
#include <stdio.h>
#include <stdlib.h>
@rapando
rapando / .bashrc
Last active June 5, 2017 20:43
This customises your terminal to resemble arch or mac. Tested on Linux Mint 18.1 Cinammon and Ubuntu 16.04.It does not affect color but removes the directory name and username. Download it into the home folder (replace the current .bashrc) then run source ~/.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
cd ~
mkdir code
sudo add-apt-repository ppa:webupd8team/java
sudo add-apt-repository ppa:noobslab/icons
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt update
sudo apt upgrade --fix-missing
sudo apt install chromium-browser chrome-gnome-shell cmake coreutils jq default-jdk git oracle-java8-installer sublime-text nodejs-legacy libav-tools
sudo apt install numix-white-icons lila-hd-icons papirus-icons obsidian-1-icons shadow-icon-theme system76-pop-icon-theme
cd ~/
sudo add-apt-repository -y ppa:webupd8team/java
sudo add-apt-repository -y ppa:ondrej/php
sudo apt update
sudo apt upgrade --fix-missing
echo oracle-java8-installer shared/accepted-oracle-licence-v1-1 select true | sudo /usr/bin/debconf-set-selections
sudo apt install -y cmake coreutils jq default-jdk git oracle-java8-installer libav-tools python-software-properties python-pip python3-pip python-dev build-essential
sudo apt install -y nodejs npm apache2
sudo apache2ctl configtest
sudo apt install -y mysql-server
REM Assignment : Eye Diagnosis Expert System
RULE [Do you have a lazy eye?]
If [lazyeye] = "yes"
Then [the recommendation] = "You have a lazy eye" @ 100
RULE [Do you see well at night?]
If [seewellatnight] = "No"
Then [the recommendation] = "You have Night Blindness" @ 100
{
"blade.format.enable": true,
"csv-preview.lineNumbers": true,
"csv-preview.resizeColumns": "all",
"editor.fontFamily": "Monaco",
"editor.fontSize": 12,
"editor.minimap.enabled": false,
"editor.glyphMargin": false,
/*
Name: Luhn's algorithm.
Function: Validating Credit card Numbers
Language: C
Date: May 12, 2018
-- Comment --
All tests passed except for the following input format: 3782-822-463-10005
*/
@rapando
rapando / counties.json
Last active May 23, 2018 12:11 — forked from kharioki/counties.json
Kenya county names, codes and capitals in JSON
[{
"name": "Mombasa County",
"code": 1,
"capital": "Mombasa City"
}, {
"name": "Kwale County",
"code": 2,
"capital": "Kwale"
}, {
"name": "Kilifi County",
google-chrome --disable-web-security --user-data-dir
#include <stdio.h>
#include <stdlib.h>
int main() {
system("/home/sam/pgadmin4/pgadmin4");
system("google-chrome 127.0.0.1:5050/browser");
return 0;
}