Skip to content

Instantly share code, notes, and snippets.

View eliandoran's full-sized avatar
🚀

Elian Doran eliandoran

🚀
  • Esevo Tech
  • Sibiu, Romania
View GitHub Profile
<!DOCTYPE
<html>
<body>
<label>Curs valutar</label>
<input id="exchange-rate" type="text" disabled />
<button id="update-button">Update</button>
<script>
var URL = "http://www.infovalutar.ro/bnr/azi/eur";
var updateButtonEl = document.getElementById("update-button");
@eliandoran
eliandoran / extract-fonts.sh
Created January 7, 2019 09:56
Extract script for MicroEJ fonts
#!/bin/bash
FONT_PATH=$1
# Check if the font was provided as an argument.
if [ -z $FONT_PATH ]
then
echo "Usage: $0 <font>"
echo "Where <font> is the .ejf font to be extracted."
exit
fi
@eliandoran
eliandoran / Weather.py
Created November 22, 2017 14:18
A small Python script that uses Open Weather Map to obtain meteorological information for a city
import requests
import datetime
import time
class OpenWeatherMap:
def __init__(self, city, api_key):
self.city = city
self.api_key = api_key
def obtain_data(self):
@eliandoran
eliandoran / .htaccess
Created March 17, 2017 05:30
Redirect traffic from HTTP to HTTPS
# BEGIN Redirection to HTTPS
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
# END Redirection to HTTPS