Skip to content

Instantly share code, notes, and snippets.

View brianraila's full-sized avatar
👨‍💻
Gaming on VS Code.

Amolo brianraila

👨‍💻
Gaming on VS Code.
View GitHub Profile
0x8116B3bBe9e0D464852a5A25A2C28CAddb2dd462
@brianraila
brianraila / crawler1.py
Last active October 17, 2018 08:51
New cars
import requests
import csv
from bs4 import BeautifulSoup
max_pgs = 540
min_pgs = 0
@brianraila
brianraila / crawler2.py
Last active October 18, 2018 02:26
Old cars
# used cars
import requests
import csv
from bs4 import BeautifulSoup
USED_CARS_URL = 'https://www.sgcarmart.com/used_cars/info.php?ID={}&DL={}'
@brianraila
brianraila / docker-compose.yml
Created June 12, 2019 14:17
Docker Compose file for OpenEMR
version: '3.1'
services:
mysql:
restart: always
image: mariadb:10.2
command: ['mysqld','--character-set-server=utf8']
volumes:
- databasevolume:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
@brianraila
brianraila / index.html
Last active June 14, 2019 21:37
Preloader HTML CSS
<div class="container">
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
@brianraila
brianraila / flask_cors.py
Created July 2, 2019 16:55 — forked from blixt/flask_cors.py
How to add CORS support to a Flask app in 9 lines of code
def add_cors_headers(response):
response.headers['Access-Control-Allow-Origin'] = '*'
if request.method == 'OPTIONS':
response.headers['Access-Control-Allow-Methods'] = 'DELETE, GET, POST, PUT'
headers = request.headers.get('Access-Control-Request-Headers')
if headers:
response.headers['Access-Control-Allow-Headers'] = headers
return response
app.after_request(add_cors_headers)
@brianraila
brianraila / index.html
Created July 16, 2019 19:45 — forked from ashayh/index.html
A example of using Google Map tiles with the Leaflet mapping library - http://matchingnotes.com/using-google-map-tiles-with-leaflet
<!DOCTYPE html>
<html>
<head>
<title>Leaflet</title>
<link rel="stylesheet" href="http://code.leafletjs.com/leaflet-0.3.1/leaflet.css" />
<script src="http://code.leafletjs.com/leaflet-0.3.1/leaflet.js"></script>
<script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script>
<script src="https://raw.github.com/gist/2197042/2b90c41b39b7d5b3a851d8f256de2ebd3fe1fb74/leaflet-google.js"></script>
</head>
<body>
[
{
"name":"Convulsions",
"icd10 code":"",
"encounter": {
"patient":[
{"age":""},
{"weight":""}
],
"initial":[
@brianraila
brianraila / .gitignore
Created February 22, 2020 21:59
Standard Flask .gitignore file
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python