Skip to content

Instantly share code, notes, and snippets.

View douglasmiranda's full-sized avatar
👽

Douglas Miranda douglasmiranda

👽
  • Earth, Brazil
View GitHub Profile
@shrmnk
shrmnk / README.md
Created July 6, 2023 17:55
Setting up Cloudflared DoH client on Ubuntu Server with resolved
  1. Install cloudflared
  2. Create /etc/systemd.system/cloudflared-proxy-dns.service with contents:
[Unit]
Description=DNS over HTTPS (DoH) proxy client
Wants=network-online.target nss-lookup.target
Before=nss-lookup.target

[Service]
AmbientCapabilities=CAP_NET_BIND_SERVICE
@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 September 16, 2024 18:07
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
@benbacardi
benbacardi / templatetags.py
Last active August 25, 2024 23:07
Django query_transform templatetag
from django import template
register = template.Library()
@register.simple_tag(takes_context=True)
def query_transform(context, **kwargs):
'''
Returns the URL-encoded querystring for the current page,
updating the params with the key/value pairs passed to the tag.
@danni
danni / fields.py
Created March 8, 2016 08:52
Multi Choice Django Array Field
from django import forms
from django.contrib.postgres.fields import ArrayField
class ChoiceArrayField(ArrayField):
"""
A field that allows us to store an array of choices.
Uses Django 1.9's postgres ArrayField
and a MultipleChoiceField for its formfield.