This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* -------------------------------------------------------------------------- */ | |
| // All Bootstrap 4 Sass Mixins [Cheat sheet] | |
| // Updated to Bootstrap v4.5.x | |
| // @author https://anschaef.de | |
| // @see https://github.com/twbs/bootstrap/tree/master/scss/mixins | |
| /* -------------------------------------------------------------------------- */ | |
| /* | |
| // ########################################################################## */ | |
| // New cheat sheet for Bootstrap 5: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://snipplr.com/view.php?codeview&id=70656 | |
| # First: | |
| DELETE FROM wp_postmeta | |
| WHERE post_id IN | |
| ( | |
| SELECT id | |
| FROM wp_posts | |
| WHERE post_type = 'attachment' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cv2 | |
| import sys | |
| import os | |
| class FaceCropper(object): | |
| CASCADE_PATH = "data/haarcascades/haarcascade_frontalface_default.xml" | |
| def __init__(self): | |
| self.face_cascade = cv2.CascadeClassifier(self.CASCADE_PATH) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Sample as to how to initialize s3 client to work with Minio API compatible - https://github.com/minio/minio | |
| # AWS CLI counterpart - https://docs.minio.io/docs/aws-cli-with-minio | |
| import boto3 | |
| s3 = boto3.resource('s3', | |
| endpoint_url='http://<minio_IP>:9000', | |
| config=boto3.session.Config(signature_version='s3v4') | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. download file in https://robomongo.org/download | |
| 2. unzip the file to `/opt`: `tar -zxvf robomongo-0.9.0-rc7-linux-x86_64-2b7a8ca.tar.gz` | |
| 3. cd to `/opt/robomongo-0.9.0-rc7-linux-x86_64-2b7a8ca/bin`, execute `robomongo` | |
| 4. create a new alias in ZSH: `alias robomongo='/opt/robomongo-0.9.0-rc7-linux-x86_64-2b7a8ca/bin/robomongo'` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Dockerfile | |
| config.xml | |
| .sass-cache | |
| .editorconfig | |
| .io-config.json | |
| .dockerignore | |
| hooks/ | |
| platforms/ | |
| node_modules/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @media only screen and (max-width: 760px) { | |
| .woocommerce-cart #content .woocommerce table.shop_table td, | |
| .woocommerce-cart #content .woocommerce-page table.shop_table td, | |
| .woocommerce-checkout #content .woocommerce table.shop_table td, | |
| .woocommerce-checkout #content .woocommerce-page table.shop_table td { | |
| padding: 3px 0; | |
| border-top: 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE IF NOT EXISTS `pais` ( | |
| `id` int(11) NOT NULL AUTO_INCREMENT, | |
| `nome` varchar(60) DEFAULT NULL, | |
| `sigla` varchar(10) DEFAULT NULL, | |
| PRIMARY KEY (`id`) | |
| ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; | |
| INSERT INTO `pais` (`id`, `nome`, `sigla`) VALUES (1, 'Brasil', 'BR'); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80; | |
| listen 443 ssl; | |
| server_name ~^(?<user>[a-zA-Z0-9-]+)\.example\.com$; | |
| location / { | |
| resolver 8.8.8.8; | |
| rewrite ^([^.]*[^/])$ $1/ permanent; | |
| proxy_pass_header Set-Cookie; | |
| proxy_pass $scheme://example.com/user/$user$request_uri; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding: utf-8 | |
| u""" | |
| Redimensionamento proporcional de imagem, com base na altura, feito com um simples cálculo de proporção. | |
| Ex: | |
| +------+ 10 15 (altura desejada para a nova imagem) | |
| | | -- x -- | |
| | 10x5 | 5 x (largura proporcional a nova altura) | |
| | | | |
| +------+ (10 x x) = (5 x 15) | |
| 10x = 75 |
NewerOlder