Skip to content

Instantly share code, notes, and snippets.

View andreztz's full-sized avatar
🔌
High tech, low life.

André P. Santos andreztz

🔌
High tech, low life.
View GitHub Profile
sudo add-apt-repository ppa:libreoffice/ppa
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install ppa-purge
sudo ppa-purge ppa:libreoffice/ppa
@andreztz
andreztz / nautilus-mass-file-renamer
Created March 30, 2016 07:06
Nautilus script for mass file renaming
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Nautilus Mass File Renamer is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@andreztz
andreztz / angular-bootstrap-nav.html
Created April 2, 2016 01:12 — forked from fpv83/angular-bootstrap-nav.html
angular navbar directive for twitter bootstrap with the aid of bootstrap.ui
<!DOCTYPE html>
<html data-ng-app="webapp">
<head>
<title>angular nav</title>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<style>
body{
padding-top: 70px;
}
@andreztz
andreztz / api-rest-flask-intro.py
Created June 10, 2016 04:23
Intro api rest with Flask
from flask import Flask
from flask import jsonify
from flask import request
app = Flask(__name__)
languages =[
{'name': 'JavaScript'},
{'name': 'Python'},
@andreztz
andreztz / Git push deployment in 7 easy steps.md
Created July 2, 2016 23:34 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@andreztz
andreztz / breakpoints.css
Created July 14, 2016 19:41 — forked from MatthewEppelsheimer/breakpoints.css
Responsive Break Point Media Query Boilerplate
// Mobile First
@media screen and (min-width: 321px) { // iPhone landscape
}
@media screen and (min-width: 481px) { // iPad portrait
}
<nav class="navbar navbar-default navbar-fixed-top" style="z-index: 999; position: absolute;">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
"""
http://pillow.readthedocs.io/en/3.2.x/handbook/tutorial.html
"""
from os import listdir
from subprocess import run
from subprocess import PIPE
from subprocess import check_output
from PIL import Image
#! python3
# backupToZip.py
# Copies an entire folder and its contents into
# a zip file whose filename increments.
import zipfile, os
def backupToZip(folder):
# Backup the entire contents of "folder" into a zip file.
# -*- coding: utf-8 -*-
import shutil
import os
import time
import sys
origem = '/home/suporte/Downloads'
destino = '/home/suporte/%s' % time.strftime('%d-%m-%Y_%H:%M:%S')