Skip to content

Instantly share code, notes, and snippets.

@ZoiaoDePeixe
ZoiaoDePeixe / localhost-ssl-certificate.md
Created August 20, 2019 17:53 — forked from ethicka/localhost-ssl-certificate.md
Localhost SSL Certificate on Mac OS Sierra and High Sierra

This gives you that beautiful green lock in Chrome. I'm assuming you're putting your SSL documents in /etc/ssl, but you can put them anywhere and replace the references in the following commands. Tested successfully on Mac OS Sierra and High Sierra.

Set up localhost.conf

sudo nano /etc/ssl/localhost/localhost.conf

Content:

[req]
@ZoiaoDePeixe
ZoiaoDePeixe / mysql-docker.sh
Created June 12, 2019 10:37 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@ZoiaoDePeixe
ZoiaoDePeixe / port_scanner.php
Created April 27, 2019 14:33 — forked from akalongman/port_scanner.php
Port scanner on PHP
<?php
ini_set('max_execution_time', 0);
ini_set('memory_limit', -1);
$host = 'google.com';
$ports = array(21, 25, 80, 81, 110, 143, 443, 587, 2525, 3306);
foreach ($ports as $port)
{
$connection = @fsockopen($host, $port, $errno, $errstr, 2);
@ZoiaoDePeixe
ZoiaoDePeixe / readme.markdown
Created June 6, 2017 01:19 — forked from larrybotha/readme.markdown
Postfix Using Gmail SMTP in Mac OSX Mavericks
/* hide the google bar */
body {
margin-top: -25px !important;
margin-bottom: 20px;
height: 100%;
}
/* but leave the settings link */
a[href="https://mail.google.com/mail/#settings"] {
position: absolute !important;
@ZoiaoDePeixe
ZoiaoDePeixe / gmail_style_squeeze.css
Created April 11, 2017 00:34 — forked from smhmic/gmail_style_squeeze.css
Gmail style tweaks for visibility. This is a hacky little set of CSS styles for Gmail. * The intention was to make 'Compact' view even more compact, especially in the sidebar, toolbar buttons, and message list areas.
/**
* Copyright 2012 by smhmic. All rights reserved.
* @author smhmic@gmail.com
* @date 9/20/2012
*
* This is a hacky little set of CSS styles for Gmail.
* The intention was to make 'Compact' view even more compact, especially in the sidebar, toolbar buttons, and message list areas.
*
* Gmail changes often, but hopefully these styles will continue to work for a wee while!
* It was tested using
@ZoiaoDePeixe
ZoiaoDePeixe / max_width_email.html
Created December 5, 2016 19:05 — forked from elidickinson/max_width_email.html
Email Template trick: max-width with outlook
<!--[if mso]>
<center>
<table><tr><td width="580">
<![endif]-->
<div style="max-width:580px; margin:0 auto;">
<p>This text will be centered and constrained to 580 pixels even on Outlook which does not support max-width CSS</p>
</div>
<!--[if mso]>
@ZoiaoDePeixe
ZoiaoDePeixe / README.md
Last active October 1, 2016 13:30 — forked from jonathantneal/README.md
Local SSL websites on Mac OSX

Local SSL websites on Mac OSX

These instructions will guide you through the process of setting up local, trusted websites on your own computer.

These instructions are intended to be used on Mac OSX Yosemite.

NOTE: You may substitute the edit command for nano, vim, or whatever the editor of your choice is. Personally, I forward edit to Sublime Text:

alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
<div class="box">
<div class="block pricing">
<div class="total">
{% if pricing.type == 'free' %}
{% if product.allow_quantity_select %}
<label>{% trans 'Quantity:' %}
<input type="text" name="quantity" value="1" style="width:30px;"/>
</label>