Skip to content

Instantly share code, notes, and snippets.

View eon01's full-sized avatar
🎯
Focusing

Aymen EL Amri eon01

🎯
Focusing
View GitHub Profile
@eon01
eon01 / countries.json
Last active August 29, 2015 14:04 — forked from keeguon/countries.json
Countries JSON
[
{"name": "Afghanistan", "code": "AF"},
{"name": "Åland Islands", "code": "AX"},
{"name": "Albania", "code": "AL"},
{"name": "Algeria", "code": "DZ"},
{"name": "American Samoa", "code": "AS"},
{"name": "AndorrA", "code": "AD"},
{"name": "Angola", "code": "AO"},
{"name": "Anguilla", "code": "AI"},
{"name": "Antarctica", "code": "AQ"},
@eon01
eon01 / nginx_basics.md
Created April 17, 2016 11:08 — forked from leommoore/nginx_basics.md
Nginx Basics

#Nginx Basics for Ubuntu

Please see http://wiki.nginx.org/Main for more information. See http://arstechnica.com/gadgets/2012/11/how-to-set-up-a-safe-and-secure-web-server/ for a tutorial on how to install Nginx.

##Installation To install, you can install the version which is in the standard Ubuntu repositories but it is normally quite old and will not have the latest security patches. The best way is to update the repositories first:

apt-get update
apt-get install python-software-properties

apt-get upgrade

@eon01
eon01 / configure_docker0.sh
Last active September 17, 2020 01:06 — forked from kamermans/configure_docker0.sh
Change the IP subnet of Docker's docker0 interface
# Example1: configure_docker0.sh 192.168.10.1/16
# Example1: configure_docker0.sh 192.168.11.1/16
#
# PLEASE READ:
# - Make sure you replace "192.168.10.0/16" with the network that you want to use
# - Make sure you are using Debian/Ubuntu
# - This script must be run with your root user
# - Docker must be stopped
# - IP change will occur after starting Docker
#
@eon01
eon01 / github_flask_oauth2.py
Created April 5, 2017 20:55 — forked from ib-lundgren/github_flask_oauth2.py
Example of how to use Flask with requests-oauthlib to fetch a GitHub user profile using an OAuth 2 token.
from requests_oauthlib import OAuth2Session
from flask import Flask, request, redirect, session, url_for
from flask.json import jsonify
import os
app = Flask(__name__)
# This information is obtained upon registration of a new GitHub
client_id = "<your client key>"
@eon01
eon01 / Install_React_Native_Android_on_Ubuntu.md
Last active December 19, 2022 10:58 — forked from ShirajG/Install_React_Native_Android_on_Ubuntu.md
Steps for getting a working Linux install for React Native Android

Installing React Native Android on Ubuntu

Here are the steps for getting a working Linux install for React Native:

  1. Install Java SDK
  1. Install KVM
    • sudo apt-get install qemu-kvm libvirt-bin bridge-utils virt-manager
    • sudo adduser $USER libvirtd
@eon01
eon01 / docker-destroy-all.sh
Last active June 7, 2017 15:44 — forked from JeffBelback/docker-destroy-all.sh
Destroy all Docker Containers and Images
#!/bin/bash
# Destroy everything
# https://www.youtube.com/watch?v=DBwgX8yBqsw
#
# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@eon01
eon01 / install virtualenv ubuntu 16.04.md
Created July 31, 2018 20:55 — forked from Geoyi/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@eon01
eon01 / gist:6f175a55baa64f0207174cc02d2f9a41
Created July 31, 2019 12:06 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@eon01
eon01 / reltime.py
Created August 2, 2019 09:47 — forked from deontologician/reltime.py
Relative datetimes in python
def reltime(date, compare_to=None, at='@'):
r'''Takes a datetime and returns a relative representation of the
time.
:param date: The date to render relatively
:param compare_to: what to compare the date to. Defaults to datetime.now()
:param at: date/time separator. defaults to "@". "at" is also reasonable.
>>> from datetime import datetime, timedelta
>>> today = datetime(2050, 9, 2, 15, 00)
>>> earlier = datetime(2050, 9, 2, 12)
@eon01
eon01 / meta-tags.md
Created August 8, 2019 11:47 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">