Skip to content

Instantly share code, notes, and snippets.

View jroquejr's full-sized avatar

Roque Junior jroquejr

View GitHub Profile
@anschaef
anschaef / bootstrap-4-sass-mixins-cheat-sheet.scss
Last active August 11, 2025 18:58
Bootstrap 4 Sass Mixins [Cheat sheet with examples]
/* -------------------------------------------------------------------------- */
// 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:
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'
@tilfin
tilfin / face_cropper.py
Created December 27, 2016 13:18
Face detect and crop by using OpenCV
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)
@heitorlessa
heitorlessa / example_minio_boto3.py
Created August 30, 2016 14:18
Minio with python boto3
# 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')
)
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'`
@frankV
frankV / .dockerignore
Created December 22, 2015 06:06
Dockerfile for an Ionic Framework Project
Dockerfile
config.xml
.sass-cache
.editorconfig
.io-config.json
.dockerignore
hooks/
platforms/
node_modules/
@yratof
yratof / _base.scss
Created May 22, 2014 14:32
WooCommerce Checkout for Mobile
@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;
}
@tcelestino
tcelestino / estados_cidades.sql
Created June 6, 2013 19:02
Cidades e estados brasileiros
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');
@thomasgriffin
thomasgriffin / gist:4733283
Created February 7, 2013 19:05
Map subdomains to URLs in nginx with WordPress.
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;
@macndesign
macndesign / proporcional_img_altura.py
Created December 26, 2012 19:46
Redimensionamento proporcional de imagem, com base na altura, feito com um simples cálculo de proporção.
# 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