Skip to content

Instantly share code, notes, and snippets.

@sidneydemoraes
sidneydemoraes / cleanup_cacerts
Last active July 12, 2023 18:11
Scripts for Java keytools
keytool -list -cacerts | awk -F',' 'NR > 5 && NR % 2 == 0 {print $1}' | xargs -I{} keytool -delete -cacerts -alias '{}'
@sidneydemoraes
sidneydemoraes / dark-version.html
Last active May 31, 2022 18:44
HTML Maintenance Page
<!doctype html>
<html>
<head>
<title>Site Maintenance</title>
<meta charset="utf-8"/>
<meta name="robots" content="noindex"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body { text-align: center; padding: 20px; font: 20px Helvetica, sans-serif; color: #efe8e8; }
@media (min-width: 768px){
@sidneydemoraes
sidneydemoraes / howto.md
Created August 29, 2019 20:50 — forked from h4cc/howto.md
Getting Thumbnails / Previews of your RAW files in Ubuntu

Howto

Install these programms

sudo apt-get install gnome-raw-thumbnailer ufraw-batch

Try now if everything works, and your thumbnails show up. If not, try the following part.

@sidneydemoraes
sidneydemoraes / mysqldump
Created August 2, 2019 17:20
Mysqldump client for DBeaver with Docker (without installing mysql-client)
#!/bin/sh
# File location: /usr/local/bin/mysqldump
# File permission: +x
docker run --rm mysql:latest /usr/bin/mysqldump
@sidneydemoraes
sidneydemoraes / .vimrc
Created June 29, 2019 15:28
Exemplo de configuração para Vim do Filipe Deschamps
" Author: Filipe Deschamps
" Source: https://github.com/filipedeschamps/dotfiles
" LEADER KEY
let mapleader=","
" COMPATIBILITY
" Set 'nocompatible' to avoid unexpected things that your distro might have
set nocompatible
@sidneydemoraes
sidneydemoraes / gitab-ci.yml
Created June 24, 2019 02:54
Exemplo Gitlab-CI
#missaodevops.com.br
image: node
stages:
- test
- package
- deploy
before_script:
@sidneydemoraes
sidneydemoraes / README.txt
Created May 20, 2019 17:12
@WebMvcTest + Spock
Atentar para o fato que o ByteBuddy pode dar erro. É necessário fazer o upgrade da versão dele de acordo com a versão do Spock utilizado no projeto.
@sidneydemoraes
sidneydemoraes / docker-compose.yaml
Created April 15, 2019 15:06
WP docker-compose example
version: '3.5'
services:
wordpress:
image: wordpress-with-theme
build: <git-repo-here>
restart: unless-stopped
depends_on:
- database
healthcheck:
@sidneydemoraes
sidneydemoraes / multi_implosao.php
Last active November 22, 2018 20:04
Implosão Recursiva de Array PHP
<?php
function multi_implode($array, $parent = '') {
$ret = '';
foreach ($array as $key => $value) {
if (is_array($value)) {
$ret .= multi_implode($value, $parent . $key . '=>');
} else {
$ret .= $parent . $key . '=>' . $value . "\n";
}
@sidneydemoraes
sidneydemoraes / gulpfile.js
Last active February 9, 2018 16:57
Exemplo de config para Gulp
var autoPrefixBrowserList = ['last 2 ff versions', 'last 2 chrome versions', 'last 2 Edge versions',
'last 2 safari versions', 'android >= 5', 'ie >= 10', 'safari >=8', 'ios >= 10'],
gulp = require('gulp'),
browserSync = require('browser-sync'),
plumber = require('gulp-plumber'),
del = require('del'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
rjs = require('gulp-requirejs-optimize'),
gulpSequence = require('gulp-sequence').use(gulp),