Skip to content

Instantly share code, notes, and snippets.

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

adonis simo simo97

🏠
Working from home
View GitHub Profile
@simo97
simo97 / slugify.js
Created October 29, 2019 21:31 — forked from codeguy/slugify.js
Create slug from string in Javascript
function string_to_slug (str) {
str = str.replace(/^\s+|\s+$/g, ''); // trim
str = str.toLowerCase();
// remove accents, swap ñ for n, etc
var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;";
var to = "aaaaeeeeiiiioooouuuunc------";
for (var i=0, l=from.length ; i<l ; i++) {
str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i));
}
@simo97
simo97 / media-query.css
Created September 19, 2019 08:19 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@simo97
simo97 / postgres-brew.md
Created June 24, 2019 14:29 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@simo97
simo97 / remote-git.md
Created May 24, 2019 13:38 — forked from Integralist/remote-git.md
Basic set-up of remote git repository on a standard server

Set-up remote git repository on a standard server

The first thing to do is to install Git on the remote server.

Once you do that the rest of the process is split into three sections:

  1. Server set-up
  2. Local set-up (push commits)
  3. Server (pull commits)
@simo97
simo97 / install virtualenv ubuntu 16.04.md
Created February 17, 2019 23:17 — forked from frfahim/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 
@simo97
simo97 / currencies.py
Created November 23, 2018 09:36 — forked from mjallday/currencies.py
Tuple of currencies for Python
# -*- coding: utf-8 -*-
"""
list of currencies currently in circulation
taken from http://www.currency-iso.org/iso_index/iso_tables/iso_tables_a1.htm
http://www.iso.org/iso/currency_codes_list-1.html
2011-08-11
"""
@simo97
simo97 / nginx-tuning.md
Created October 7, 2018 20:45 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@simo97
simo97 / pwnedpasswords-v2-top20k.txt
Created September 16, 2018 18:21 — forked from roycewilliams/pwnedpasswords-v2-top20k.txt
pwnedpasswords-v2-top20k.txt
This file has been truncated, but you can view the full file.
# Top 20K hashes from the Troy Hunt / haveibeenpwned Pwned Passwords list v2 (2018-02-21)
# Original raw as published is at https://gist.github.com/roycewilliams/eef06c1148707ce8c8a1dea85768b207
20760336:7c4a8d09ca3762af61e59520943dc26494f8941b:123456
7016669:f7c3bc1d808e04732adf679965ccc34ca7ae3441:123456789
3599486:b1b3773a05c0ed0176787a4f1574ff0075f7521e:qwerty
3303003:5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8:password
2900049:3d4f2bf07dc1be38b20cd6e46949a1071f9d0e3d:111111
2680521:7c222fb2927d828af22f592134e8932480637c0d:12345678
2670319:6367c48dd193d56ea7b0baad25b19455e529f5ee:abc123
2310111:e38ad214943daad1d64c102faec29de4afe9da3d:password1
@simo97
simo97 / install virtualenv ubuntu 16.04.md
Created June 10, 2018 11:35 — 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 
@simo97
simo97 / Beginner-friendly Python Open Source Projects
Created April 4, 2018 14:22 — forked from ossanna16/Beginner-friendly Python Open Source Projects
This is a list of beginner-friendly Python open source projects. I'm always looking for new projects to add to my list, if you have an idea please tweet me at @ossanna16 :)
* OpenHatch - https://openhatch.org/search/?q=&language=Python
* PyLadies - https://github.com/pyladies
* New Coder - https://github.com/econchick/new-coder
* Django Girls - https://github.com/DjangoGirls
* Matplotlib - https://github.com/matplotlib/matplotlib
* Hylang - http://docs.hylang.org/en/latest/, https://github.com/hylang/hy
* Open Slides (Django) - http://openslides.org/
* Zeeguu - https://zeeguu.unibe.ch
* Project Jupyter - https://github.com/jupyter
* nbgrader - https://github.com/jupyter/nbgrader