Skip to content

Instantly share code, notes, and snippets.

View yurisasuke's full-sized avatar

itachi sasuke yurisasuke

View GitHub Profile
@yurisasuke
yurisasuke / Common-Currency.json
Last active June 29, 2021 11:59 — forked from ksafranski/Common-Currency.json
Common Currency Codes in JSON
[
{
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
from bs4 import BeautifulSoup
import requests
import csv
def harvest_data():
req = requests.get('https://www.jumia.co.ke')
data = req.text
soup = BeautifulSoup(data, 'html.parser')
# print (soup.prettify())
@yurisasuke
yurisasuke / Golang absolute url
Created July 9, 2019 02:44
Golang absolute image url...when compiled
package main
import (
"io"
"path"
"encoding/json"
"log"
"net/http"
"os"
@yurisasuke
yurisasuke / nginx
Created July 2, 2019 09:34
setunp nginx to serve images
server{
listen 80 default_server;
server_name example.com www.example.com
server_name dev ipv6only=on;
root /path/to/your/image/folder;
location / images {
}
@yurisasuke
yurisasuke / middleware.go
Created August 1, 2018 05:58
This is a simple file showing how to write middleware in golang.It also provides an easy way of chaining middlewares
package middleware
import (
"net/http"
"strings"
)
type Middleware func( http.Handler) http.Handler