Skip to content

Instantly share code, notes, and snippets.

View chege-kimaru's full-sized avatar
🏠
Working from home

Kevin Kimaru chege-kimaru

🏠
Working from home
View GitHub Profile
@chege-kimaru
chege-kimaru / fileuploader.html
Created May 17, 2020 19:41
A sample code on how to upload a file without using form input
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>File Uploader</title>
<style>
.container {
width: 100%;
height: 100%;
@chege-kimaru
chege-kimaru / proxy.conf
Created July 4, 2020 12:09
Reverse Proxy in apache
#If ot backfires, do this first
#a2enmod proxy
#a2enmod proxy_http
#/etc/apache2/sites-available/abcd.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName mySite
ServerAlias www.abcd.com
DocumentRoot /var/www/html/abcd
.terminal {
position: relative;
width: 80%;
max-width: 600px;
border-radius: 6px;
padding-top: 45px;
margin-top: 8px;
overflow: hidden;
background-color: rgb(15, 15, 16);
}
@chege-kimaru
chege-kimaru / hover.css
Created July 4, 2020 22:25
Hover on card
.card-container .card:not(.highlight-card):hover {
transform: translateY(-3px);
box-shadow: 0 4px 17px rgba(0, 0, 0, 0.35);
}
.card-container .card:not(.highlight-card):hover .material-icons path {
fill: rgb(105, 103, 103);
}
@chege-kimaru
chege-kimaru / nginx-reverse-proxy.conf
Last active July 18, 2020 15:26
Reverse Proxy for Nginx
server {
server_name example.com;
root /var/www/html/example.com/html;
index index.html index.htm;
client_max_body_size 10G;
location / {
@chege-kimaru
chege-kimaru / pm2
Created July 18, 2020 17:01
pm2 help
https://pm2.keymetrics.io/docs/tutorials/pm2-nginx-production-setup
create bash file and input:
#!/bin/bash
echo "welcome"
ls
echo "this is the whole list of dir"
Read- read permission is assigned to 4
Write- write permission is assigned to 2
Execute- execute permission is assigned to 1
@chege-kimaru
chege-kimaru / gist:67ed33d2c5d993a8704d0ea2197b1731
Last active May 17, 2022 21:10
Biz Mkononi Mobile App Developer Test

Mobile App Developer Assessment

Screen

  1. Sign up Screen

Sign Up Screen

  1. Sign In Screen

Sign In Screen

@chege-kimaru
chege-kimaru / My common ubuntu commands
Last active June 7, 2022 13:15
kill process running a port command
kill process on port - sudo kill -9 $(lsof -t -i:4200 -sTCP:LISTEN)
fix partition - ntfsfix /dev/sda8
mount partition - sudo mount -t ntfs-3g -o rw /dev/sda8 /media/kevin
shorten cmd path - PROMPT_DIRTRIM=1
docker system df
docker system prune --volumes
import crypto from 'crypto';
import { v4 as uuidv4 } from 'uuid';
import axios from 'axios';
const SECRET_KEY = "";
const ACCESS_KEY = "";
const PROFILE_ID = "";
const sign = (data: string) => crypto.createHmac('sha256', SECRET_KEY).update(data).digest('base64');