Skip to content

Instantly share code, notes, and snippets.

View paulobunga's full-sized avatar
🏠
Available for work

Paul Obunga paulobunga

🏠
Available for work
View GitHub Profile
@paulobunga
paulobunga / seat_generator.js
Created May 6, 2021 07:31
Bus seat generator
/**
* AUTHOR: PAUL OBUNGA <[email protected]
* BUS SEAT GENERATOR
* TODO: Take care of odd seat numbers
*
*/
let busOptions = {
license: "UBA 100L",
capacity: 72,
columns: 3,
@paulobunga
paulobunga / create_ubuntu_launcher_icon.md
Last active March 7, 2021 11:17
create_ubuntu_launcher_icon

// create file: sudo vim /usr/share/applications/intellij.desktop

// add the following

Version=13.0
Type=Application
Terminal=false
Icon[en_US]=/home/rob/.intellij-13/bin/idea.png
Name[en_US]=IntelliJ
@paulobunga
paulobunga / set_this_commit_as_initial.md
Last active April 25, 2021 11:59
How to clean all commits from remote github repository

Checkout

git checkout --orphan latest_branch

Add all the files

git add -A

Commit the changes

@paulobunga
paulobunga / uploader.js
Created November 2, 2020 20:28
Express JS file upload
const express = require("express");
const multer = require("multer");
const fs = require("fs");
const path = require("path");
const port = process.env.PORT || 3000;
const app = express();
const upload = multer({
dest: "./uploads",
});
@paulobunga
paulobunga / permissions.sh
Created August 12, 2020 08:33
Permissions
sudo chown -R $USER:$USER /the/directory/here
sudo chmod -R 777 /the/directory/here
const AssetSchema = new Schema({
assetTag: { type: String, required: true },
assetName: { type: String, required: true },
assetDescription: { type: String, required: true },
assetCatNo: { type: String, required: true },
assetStatus: { type: String },
storageLatitude: { type: String },
storageLongitude: { type: String},
assetSerialNumber: { type: String},
assetType: { type: String },
@paulobunga
paulobunga / project_setup.bat
Last active June 17, 2020 09:42
Steps to create new React Native Project
@ECHO OFF
set /P project_name="Enter project name: "
IF [%project_name%] != [] (
npx react-native init %PROJECT_NAME% --template @ui-kitten/template-ts
cd %project_name%
yarn add @react-navigation/native
yarn add react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view
yarn add @react-navigation/stack
@paulobunga
paulobunga / rsync.sh
Created April 8, 2020 13:45
File transfer using rsync
rsync -avzhe -e "ssh -i KEY_LOCATION_PEM" LOCAL_DIR SERVER_USER@SERVER_IP:SERVER_DIR
@paulobunga
paulobunga / countdown-timer-with-svg-circle.markdown
Created January 3, 2020 18:24
Countdown timer with SVG circle

Countdown timer with SVG circle

I used stroke-dasharray and stroke-dashoffset in a circle svg element. Setting stroke-dasharray to a full circle (e.g. 113px) and animating the stroke-dashoffset from 0px to 113px makes the circle's stroke disappear gradually.

A Pen by ไน้ท์นี on CodePen.

License.

@paulobunga
paulobunga / package.json
Created December 18, 2019 00:45
Modify your package.json as below
{
"name": "node_api",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node index",
"start:dev": "nodemon index"
},
"keywords": [],