Skip to content

Instantly share code, notes, and snippets.

View cheseremtitus24's full-sized avatar
🏠
Working from home

Cheserem Titus cheseremtitus24

🏠
Working from home
View GitHub Profile
@cheseremtitus24
cheseremtitus24 / ec2-startup.sh
Created August 1, 2023 17:03 — forked from ReedD/ec2-startup.sh
User data for EC2 to set up Docker and Compose (Fig) for ec2-user
#!/bin/sh
export PATH=/usr/local/bin:$PATH;
yum update
yum install docker -y
service docker start
# Docker login notes:
# - For no email, just put one blank space.
# - Also the private repo protocol and version are needed for docker
# to properly setup the .dockercfg file to work with compose
#! /bin/sh
### BEGIN INIT INFO
# Provides: chilli
# Required-Start: $remote_fs $syslog $network
# Required-Stop: $remote_fs $syslog $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start CoovaChilli daemon at boot time
# Description: Enable CoovaChilli service provided by daemon.
### END INIT INFO
@cheseremtitus24
cheseremtitus24 / rest-server.py
Created April 27, 2023 10:37 — forked from miguelgrinberg/rest-server.py
The code from my article on building RESTful web services with Python and the Flask microframework. See the article here: http://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask
#!flask/bin/python
from flask import Flask, jsonify, abort, request, make_response, url_for
from flask_httpauth import HTTPBasicAuth
app = Flask(__name__, static_url_path = "")
auth = HTTPBasicAuth()
@auth.get_password
def get_password(username):
if username == 'miguel':
@cheseremtitus24
cheseremtitus24 / hash_table.c
Created January 8, 2023 06:15 — forked from kuriringohankamehameha/hash_table.c
An Implementation of a Hash Table using Separate Chaining
/**
Code for https://journaldev.com article
Purpose: A Hash Table Implementation
@author: Vijay Ramachandran
@date: 01-02-2020
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#OS: Ubuntu 22.04.1 LTS x86_64
apt-get update
apt-get install -y g++ automake autoconf libtool libltdl-dev gengetopt make cmake libssl-dev libjson-c-dev daemon route libaio1 libaio-dev
# Install debuild
sudo apt install -y devscripts
debuild -i -us -uc -b
# update debian/rules and add in the following content