This file contains 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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
''' | |
Example: ./kinfoservices --imagesize=32 --fileout=file.txt | |
''' | |
import os, sys | |
from xdg.DesktopEntry import * | |
from xdg.IconTheme import * |
This file contains 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
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
from PyQt5.QtWidgets import QApplication | |
from PyQt5.QtWebKit import QWebSettings | |
from PyQt5.QtWebKitWidgets import QWebView | |
from PyQt5.QtCore import QUrl |
This file contains 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
<html> | |
<head> | |
<title>Resolve Conflicts UI Frameworks</title> | |
<!-- styles --> | |
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/css/bootstrap.min.css" /> | |
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/1.0.1/semantic.min.css" /> | |
</head> | |
<body> | |
This file contains 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
[Desktop Entry] | |
Name=My Applications | |
Name[es]=Mi aplicacione | |
Name[pt_BR]=Meu Aplicativo | |
Comment=My Comment | |
Comment[es]=Mi comentario | |
Comment[pt_BR]=Meu comentário | |
Exec=/usr/bin/app --abc | |
Icon=preferences-desktop-theme | |
Categories=XPTO |
This file contains 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
pkgname=kcenter | |
pkgver=0.0.1 | |
pkgrel=1 | |
pkgdesc="A system configuration for KDE" | |
arch=('i686' 'x86_64') | |
url="http://www.kaiana.com.br/" | |
license=('GPLv2') | |
depends=('python', 'python-pyqt5', 'qt5-webkit', 'python-xdg', ) | |
source=('https://github.com/kaiana/${pkgname}/archive/${pkgver}.tar.gz') | |
md5sums=('6a676c12910d0ca2cd2c9a55d954fce4df385f1e') |
This file contains 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
#!/usr/bin/env python | |
# aptinstall.py | |
import apt | |
import sys | |
pkg_name = "firefox" | |
cache = apt.cache.Cache() | |
cache.update() |
This file contains 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
#!/bin/bash | |
REPO=NAME_HERE | |
# Dir paths on remote server | |
# These are associated with branches within a git project | |
LIVE_BRANCH="master" | |
LIVE="git@host:/var/www/live/" | |
STAGE_BRANCH="develop" | |
STAGE="git@host:/var/www/stage/" |
Depois do manifesto dos Programadores Que Se Garantem chegou por aqui um novo Padrão de Projeto.
Note que um padrão de projeto é uma arte. Não são todas as pessoas que sabem usá-los, muito menos entendê-los. Esse padrão é especial, "Padrão Fênix", "Exceção Fenix" ou em inglês e mais chic: Phoenix Exception!
A Phoenix Exception consiste em um sistema que nunca morre, pois assim como a Phoenix, ele sempre renasce das cinzas.
Veja um exemplo da Phoenix Exception.
This file contains 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
#!/bin/bash | |
# host we want to "reach" | |
host=google.com | |
# get the ip of that host (works with dns and /etc/hosts. In case we get multiple ipaddresses, we just want one of them | |
host_ip=$(getent ahosts "$host" | head -1 | awk '{print $1}') | |
# only list the interface used to reach a specific host/IP. We only want the part between dev and src (use grep for that) | |
ip route get "$host_ip" | grep -Po '(?<=(dev )).*(?= src)' |
OlderNewer