Skip to content

Instantly share code, notes, and snippets.

View airstrike's full-sized avatar
🎯
bringing presentations and spreadsheets to the 21st century

Andy airstrike

🎯
bringing presentations and spreadsheets to the 21st century
View GitHub Profile
{{Info/Empresa
|nome_empresa = TIM
|razao_social = TIM Participações S.A.
|significado letras = '''T'''elecom <br /> '''I'''talia <br /> '''M''' obile
|imagem = Logo TIM.svg
|img-tam = 250px
|img-des =
|slogan = ''Você, sem fronteiras.''
|fundação = {{Dtlink|15|7|1995|idade}}<ref name="conrerp">{{citar web|url=http://www.conrerp2.org.br/index.php?mact=News,cntnt01,print,0&cntnt01articleid=298&cntnt01showtemplate=false&cntnt01returnid=118|título=LANÇAMENTO DA TIM BRASIL S.A. COM TECNOLOGIA GSM NO MERCADO BRASILEIRO|publicado=Roberto Constante Filho|data=29 de setembro de 2008|acessodata=26 de fevereiro de 2012}}</ref>
|destino =
@airstrike
airstrike / gist:7029787
Created October 17, 2013 18:24
Aggregate function: anyfrom(column)
create or replace function anyfrom(text, text)
returns text
as $$
select case when $1 is null then $2 when $2 is null then $1 else $1 end;
$$ language sql;
create aggregate anyfrom(text) (
sfunc = anyfrom,
stype = text
);
@airstrike
airstrike / GetUserInfo.bas
Created January 2, 2014 17:20
Helper functions for fetching user information from the system/environment/network.
Private Type ExtendedUserInfo
EUI_name As Long
EUI_password As Long ' Null, only settable
EUI_password_age As Long
EUI_priv As Long
EUI_home_dir As Long
EUI_comment As Long
EUI_flags As Long
EUI_script_path As Long
EUI_auth_flags As Long
@airstrike
airstrike / nginx.conf
Created February 24, 2014 22:13
Sample Nginx.conf for Trac
server {
listen 10.9.8.7:443;
server_name trac.example;
ssl on;
ssl_certificate /etc/ssl/trac.example.crt;
ssl_certificate_key /etc/ssl/trac.example.key;
ssl_session_timeout 5m;
@airstrike
airstrike / htpasswd-digest.py
Created February 25, 2014 13:11
Create htpasswd-like digest without Apache
from optparse import OptionParser
# The md5 module is deprecated in Python 2.5
try:
from hashlib import md5
except ImportError:
from md5 import md5
realm = 'trac'
# build the options
usage = "usage: %prog [options]"
#!/usr/bin/bash
#
# ANSI color scheme script featuring Space Invaders
#
# Original: http://crunchbang.org/forums/viewtopic.php?pid=126921%23p126921#p126921
# Modified by lolilolicon
#
f=3 b=4
for j in f b; do
#!/bin/bash
# ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
# colortest (tests the colors of your terminal using ANSI codes)
#
# written by: Josh D. Dotson, Oct 9th, 2011
# License as follows:
# Copyright (c) 2011 Josh D. Dotson
#
# YOU ARE HEREBY GRANTED PERMISSION TO USE THIS HOW YOU SEE FIT, AS PUBLIC DOMAIN.
# IF YOUR COUNTRY, STATE OR TOWNSHIP DOES NOT PERMIT SUCH, IT IS LICENSED SIMILAR TO
@echo off
IF "%PROJECT%" == "" (
prompt $e[0;32;40m$p$e[0;32m:$s$e[39m
) ELSE (
prompt $e[0;34;40m$c%PROJECT%$f$s$e[0;32;40m$p$e[0;32m:$s$e[39m
)
@echo on
@airstrike
airstrike / merge-pdfs.py
Last active October 22, 2015 23:05
How to merge PDFs using PyPDF2
#!/usr/env python3
import os
from PyPDF2 import PdfFileReader, PdfFileWriter
cwd = os.path.dirname(os.path.realpath(__file__))
root = input("Enter path: " + "\n" + "[Leave blank for " + cwd + "]")
if root == "":
root = cwd
@airstrike
airstrike / StyleKill.bas
Created July 3, 2014 17:59
Excel: Delete every custom cell style
Private Sub StyleKill()
Dim styT As Style
Dim intRet As Integer
For Each styT In ActiveWorkbook.Styles
On Error Resume Next
If Not styT.BuiltIn Then styT.Delete
On Error GoTo 0
Next styT
End Sub