Skip to content

Instantly share code, notes, and snippets.

View paulodiovani's full-sized avatar

Paulo Diovani Gonçalves paulodiovani

View GitHub Profile
@paulodiovani
paulodiovani / install-instructions.md
Created August 30, 2022 16:59 — forked from crispyricepc/install-instructions.md
wlprop - An xprop clone for wlroots based compositors

Dependencies

Make sure you have installed the following commands:

  • swaymsg
  • jq
  • slurp
  • awk

Installation

@paulodiovani
paulodiovani / compress_pdf.sh
Created March 8, 2021 16:09
Compress/optimize PDF file
#! /bin/bash
# AUTHOR: (c) Ricardo Ferreira
# NAME: Compress PDF 1.4
# DESCRIPTION: A nice Nautilus script with a GUI to compress and optimize PDF files
# REQUIRES: ghostscript, poppler-utils, zenity
# LICENSE: GNU GPL v3 (http://www.gnu.org/licenses/gpl.html)
# WEBSITE: https://launchpad.net/compress-pdf
# Messages
@paulodiovani
paulodiovani / java-hibernate-sqlite.md
Last active March 12, 2020 13:27 — forked from rppowell-lasfs/java-hibernate-sqlite.md
Java Hibernate-Sqlite Simple Example 2018-04-22

Java Hibernate/Sqlite Example

Dependencies

// https://mvnrepository.com/artifact/org.hibernate/hibernate-core
compile group: 'org.hibernate', name: 'hibernate-core', version: '5.2.16.Final'

// https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc
compile group: 'org.xerial', name: 'sqlite-jdbc', version: '3.21.0.1'
@paulodiovani
paulodiovani / excuses.txt
Created April 19, 2018 17:10 — forked from fortytw2/excuses.txt
programming excuses
Actually, that's a feature
Don't worry, that value is only wrong half of the time
Even though it doesn't work, how does it feel?
Everything looks fine my end
How is that possible?
I broke that deliberately to do some testing
I can have a look but there's a lot of if statements in that code!
I can't make that a priority right now
I can't test everything
I couldn't find any examples of how that can be done anywhere else in the project
@paulodiovani
paulodiovani / csd-wrapper.sh
Created January 17, 2018 01:13 — forked from l0ki000/csd-wrapper.sh
Cisco Anyconnect CSD wrapper for OpenConnect (exhanced to autodownload and autoupdate hostscan)
#!/bin/bash
# Cisco Anyconnect CSD wrapper for OpenConnect
# Enter your vpn host here
CSD_HOSTNAME=
if [[ -z ${CSD_HOSTNAME} ]]
then
echo "Define CSD_HOSTNAME with vpn-host in script text. Exiting."
exit 1
fi
@paulodiovani
paulodiovani / api models Locations.js
Created January 6, 2016 23:17 — forked from juanpasolano/api models Locations.js
seed database on sails js
/**
* Locations.js
*
* @description :: TODO: You might write a short summary of how this model works and what it represents here.
* @docs :: http://sailsjs.org/#!documentation/models
*/
module.exports = {
seedData:[
@paulodiovani
paulodiovani / viewport.coffee
Last active August 29, 2015 14:02 — forked from manfromanotherland/viewport-size.js
Script para exibir tamanho do viewport. Fontes em CoffeeScript, Javascript gerado e Javascript minificado (para usar num botão de atalho)
id = "viewport-size-by-edmundojr-paulodiovani"
# Cria o elemento do viewport, se ainda não existir
create = ->
div = document.getElementById(id) || document.createElement "div"
div.id = id
div.style.cssText = """
position:fixed; \
top:0; \
right:0; \
import re
from base_linter import BaseLinter, INPUT_METHOD_FILE
CONFIG = {
'language': 'XML',
'executable': 'xmllintschema',
'lint_args': ['-noout', '{filename}'],
'input_method': INPUT_METHOD_FILE
}
@paulodiovani
paulodiovani / gist:3625108
Created September 4, 2012 19:04 — forked from manfromanotherland/gist:2228169
jQuery: Placeholder Fix for IE
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php
$('[placeholder]').focus(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
input.removeClass('placeholder');
}
}).blur(function() {
var input = $(this);
if (input.val() == '' || input.val() == input.attr('placeholder')) {