Skip to content

Instantly share code, notes, and snippets.

View kanazux's full-sized avatar
🏠
Working from home

Silvio Giunge a.k.a kanazuchi kanazux

🏠
Working from home
View GitHub Profile
@kanazux
kanazux / gabriel.c
Created April 15, 2014 13:08
Gabriel
#include "stdlib.h"
#include "stdio.h"
int main(){
int x=0,y;
while(x<=20){
printf("Digite um numero\n");
@kanazux
kanazux / file_types.php
Last active February 1, 2023 11:09
arrays file types php
<?php
$compressed = array(
".0" => "Hacha Split Archive File",
".000" => "DoubleSpace Compressed File",
".7z" => "7-Zip Compressed File",
".7z.001" => "7-Zip Split Archive Part 1 File",
".7z.002" => "7-Zip Split Archive Part 2 File",
".a00" => "ALZip Second Split Archive File",
".a01" => "ALZip Third Split Archive File",
@kanazux
kanazux / mac_vendor_list
Created May 5, 2014 15:04
mac vendor list
00:00:00 XEROX CORPORATION
00:00:01 XEROX CORPORATION
00:00:02 XEROX CORPORATION
00:00:03 XEROX CORPORATION
00:00:04 XEROX CORPORATION
00:00:05 XEROX CORPORATION
00:00:06 XEROX CORPORATION
00:00:07 XEROX CORPORATION
00:00:08 XEROX CORPORATION
00:00:09 XEROX CORPORATION
@kanazux
kanazux / get_iface_ip.py
Created May 12, 2014 17:58
get iface inet
#!/usr/bin/env/python
# -*- coding: utf-8 -*-
import re
from subprocess import check_output as ck
get_ifaces = ck(['/sbin/ifconfig'], shell=1).split()
if_ips = []
for item in [re.sub('addr:','',item) for item in get_ifaces if re.match(r'eth[0-9](:[0-9])?|addr:[0-9]',item)]:
@kanazux
kanazux / vimrc
Last active August 29, 2015 14:01
vimrc
"*****************************************************************************
"" NeoBundle core
"*****************************************************************************
if has('vim_starting')
set nocompatible " Be iMproved
" Required:
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
@kanazux
kanazux / get_hardmob_promos.py
Last active August 29, 2015 14:01
threading on function and class
#!/usr/local/bin/python
# -*- coding: utf-8 -*-
import re
import sys
import time
import requests
import threading
import Tkinter
from BeautifulSoup import BeautifulSoup
@kanazux
kanazux / pegar_ip_valido.py
Created May 21, 2014 03:20
pegar_ip_valido.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
from urllib2 import urlopen
import xml.etree.ElementTree as etree
xmldoc = etree.fromstring(urlopen('http://www.speedtest.net/speedtest-config.php','r').read())
print xmldoc.find('client').attrib['ip']
#!/usr/bin/python
# -*- coding: utf-8 -*-
from urllib2 import urlopen
import xml.etree.ElementTree as etree
xmldoc = etree.fromstring(urlopen('http://www.speedtest.net/speedtest-config.php','r').read())
print "ISP: {} / IP: {}".format(xmldoc.find('client').attrib['isp'],xmldoc.find('client').attrib['ip'])
@kanazux
kanazux / threads_no_comment.py
Last active August 29, 2015 14:01
threads no comment
#/usr/local/bin/python
# -*- coding: utf-8 -*-
import threading
import time
class process_one(threading.Thread):
def __init__(self, name, number):
threading.Thread.__init__(self)
@kanazux
kanazux / backup_google_drive.py
Last active August 29, 2015 14:02
send backup file to google drive
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Documentação oficial https://developers.google.com/api-client-library/python/
# Foi modificado o arquivo sample.py fornecido na pagina do client.
import os
import sys
import argparse
import httplib2
from apiclient import discovery