Skip to content

Instantly share code, notes, and snippets.

View douglasmiranda's full-sized avatar
👽

Douglas Miranda douglasmiranda

👽
  • Earth, Brazil
View GitHub Profile
@cpuguy83
cpuguy83 / pull.go
Last active December 9, 2021 06:18
package main
import (
"context"
"fmt"
"io/ioutil"
"os"
"github.com/containerd/containerd/content/local"
"github.com/containerd/containerd/images"
@donvito
donvito / docker-compose-stack-elasticsearch-fluentd-nginx-kibana.yml
Last active February 27, 2020 06:03
Docker stack compose files I've created. Please feel free to use! Enjoy!
version: "3.3"
services:
elasticsearch:
image: 'docker.elastic.co/elasticsearch/elasticsearch:5.6.1'
ports:
- "9200:9200"
- "9300:9300"
volumes:
- elasticsearchvol:/usr/share/elasticsearch/data
cmder
D:PAI(A;OICI;FA;;;SY)(A;OICI;0x1200a9;;;AU)(A;OICI;FA;;;BA)S:AI(ML;OICI;NW;;;ME)
cmder\config\.history
D:AI(A;;0x1200af;;;AU)(A;ID;FA;;;SY)(A;ID;0x1200a9;;;AU)(A;ID;FA;;;BA)S:AI(ML;;NW;;;ME)
cmder\config\ConEmu.xml
D:AI(A;ID;FA;;;SY)(A;ID;0x1200a9;;;AU)(A;ID;FA;;;BA)S:AI(ML;ID;NW;;;HI)
cmder\config\settings
D:AI(A;;FA;;;AU)(A;ID;FA;;;SY)(A;ID;0x1200a9;;;AU)(A;ID;FA;;;BA)S:AI(ML;ID;NW;;;HI)
cmder\config\user-ConEmu.xml
D:AI(A;;FA;;;S-1-5-21-3296739879-1852959184-2879946361-1107)(A;ID;FA;;;SY)(A;ID;0x1200a9;;;AU)(A;ID;FA;;;BA)S:AI(ML;;NW;;;ME)
@acolyer
acolyer / jessfraz.md
Created November 19, 2017 13:39
Containers, operating systems and other fun things from The Morning Paper
@LauraCapurro
LauraCapurro / install.sh
Last active September 14, 2017 04:21 — forked from douglasmiranda/install.sh
Debian Stretch Laptop - ASUS X555U
# Add "contrib non-free" to /etc/apt/sources.list
# Example:
deb http://<some-host>/debian/ stretch main contrib non-free
# Then:
apt-get install update && apt-get install -y firmware-realtek firmware-linux-nonfree
# Essentials
@kripken
kripken / hello_world.c
Last active January 17, 2024 12:15
Standalone WebAssembly Example
int doubler(int x) {
return 2 * x;
}
@nrollr
nrollr / nginx.conf
Last active April 22, 2024 15:11
NGINX config for SSL with Let's Encrypt certs
# UPDATED 17 February 2019
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
listen [::]:80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
}
# SSL configuration
@Zulko
Zulko / zombie_france.py
Last active October 23, 2021 19:05
Zombie pandemic simulation in France
"""
Model of a Zombie outbreak in France, starting in Grenoble
This is a rewrite from this blog post by Max Berrgren:
http://maxberggren.github.io/2014/11/27/model-of-a-zombie-outbreak/
with a different country, a slightly different model, and different
libraries. The map of population density is taken from Wikimedia Commons
@mangecoeur
mangecoeur / concurrent.futures-intro.md
Last active January 9, 2024 16:04
Easy parallel python with concurrent.futures

Easy parallel python with concurrent.futures

As of version 3.3, python includes the very promising concurrent.futures module, with elegant context managers for running tasks concurrently. Thanks to the simple and consistent interface you can use both threads and processes with minimal effort.

For most CPU bound tasks - anything that is heavy number crunching - you want your program to use all the CPUs in your PC. The simplest way to get a CPU bound task to run in parallel is to use the ProcessPoolExecutor, which will create enough sub-processes to keep all your CPUs busy.

We use the context manager thusly:

with concurrent.futures.ProcessPoolExecutor() as executor:
@rxaviers
rxaviers / gist:7360908
Last active April 25, 2024 02:26
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: