Skip to content

Instantly share code, notes, and snippets.

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

Thiago Paes mrprompt

🏠
Working from home
View GitHub Profile
@mrprompt
mrprompt / autofs.md
Created July 29, 2026 13:38 — forked from rudelm/autofs.md
Use autofs on Mac OS X to mount network shares automatically during access

Autofs on Mac OS X

With autofs you can easily mount network volumes upon first access to the folder where you want to mount the volume. Autofs is available for many OS and is preinstalled on Mac OS X so I show you how I mounted my iTunes library folder using this method.

Prepare autofs to use a separate configuration file

autofs needs to be configured so that it knows where to gets its configuration. Edit the file /etc/auto_master and add the last line:

#
# Automounter master map
#

+auto_master # Use directory service

@mrprompt
mrprompt / nginx.conf
Created February 12, 2020 22:07
nginx conf
user www-data;
worker_processes auto;
pid /run/nginx.pid;
worker_rlimit_nofile 100000;
events {
#worker_connections 1024;
worker_connections 10000;
use epoll;
@mrprompt
mrprompt / config.txt
Created December 10, 2016 17:39
Raspberry Pi - melhor performance para VNC em 1366 x 768
# For more options and information see
# http://www.raspberrypi.org/documentation/configuration/config-txt.md
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1
@mrprompt
mrprompt / phpci.yml
Created October 18, 2015 01:26
PHPCI Config
build_settings:
clone_depth: 1
verbose: false
ignore:
- "migrations"
- "public"
- "resources"
- "tmp"
- "tests"
- "vendor"
@mrprompt
mrprompt / .vimrc
Last active December 15, 2016 22:20
Meu .vimrc
""" Configurações iniciais
set nocompatible " Must come first because it changes other options.
filetype off " Necessary on some Linux distros for pathogen to properly load bundles
" Habilitando o Vundle
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#rc()
@mrprompt
mrprompt / apc.ini
Created June 7, 2013 03:42
PHP APC Extension config
; Enable apc extension module
extension = apc.so
; Options for the APC module version >= 3.1.3
; See http://www.php.net/manual/en/apc.configuration.php
; This can be set to 0 to disable APC.
apc.enabled=1
; The number of shared memory segments to allocate for the compiler cache.
apc.shm_segments=1
@mrprompt
mrprompt / build.xml
Created June 7, 2013 03:41
Script de build para Phing
<?xml version="1.0" encoding="UTF-8"?>
<project name="Software" default="build" basedir=".">
<tstamp/>
<property name="application.library" value="${project.basedir}/library"/>
<property name="application.tests" value="${project.basedir}/tests"/>
<property name="application.builddir" value="${project.basedir}/build"/>
<property name="ftp.host" value="" />
@mrprompt
mrprompt / rotate.rules.iptables
Created June 7, 2013 03:40
Alterna entre IPs
#!/bin/sh
iptables -t nat -F
iptables -t nat -A POSTROUTING -s 201.33.19.171 -j SNAT --to-source 201.33.19.177-201.33.19.178
#!/bin/sh
iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o venet0 -m statistic --mode nth --every 5 -j SNAT --to-source 201.33.19.171
iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o venet0 -m statistic --mode nth --every 5 -j SNAT --to-source 201.33.19.177
iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o venet0 -m statistic --mode nth --every 5 -j SNAT --to-source 201.33.19.178
; Enable xdebug extension module
zend_extension=/usr/lib64/php/modules/xdebug.so
; ativado por padrão
xdebug.default_enable = 1
; iniciar automaticamente
xdebug.auto_start = 1
; ativa a depuração remota de scripts (mas os torna mais lentos)