Skip to content

Instantly share code, notes, and snippets.

View initbrain's full-sized avatar

Julien Deudon initbrain

View GitHub Profile
@initbrain
initbrain / tts_install.sh
Created September 19, 2013 19:08
Text to speak installation script
#!/bin/bash
# Text to speak installation script
# Testé avec Lubuntu 13.04 x86_64
# Julien Deudon (initbrain)
# Vérifier les privilèges
if [ $USER = root -o $UID -eq 0 ]
then
echo "Veuillez exécuter ce script en tant qu'utilisateur normal,"
@initbrain
initbrain / screenshot.py
Last active June 1, 2023 14:02
Python screenshot tool (fullscreen/area selection)
#!/usr/bin/env python3
# Python screenshot tool (fullscreen/area selection)
# Special thanks to @tomk11, @frakman1, @aspotton and @lucguislain for the improvements
import sys
from PyQt5 import QtCore, QtGui
from PyQt5.QtGui import QPixmap, QScreen
from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QSizePolicy
from PyQt5.QtWidgets import QGroupBox, QSpinBox, QCheckBox, QGridLayout
from PyQt5.QtWidgets import QPushButton, QHBoxLayout, QVBoxLayout
@initbrain
initbrain / latest_changes.py
Last active December 23, 2015 11:39
List changed files during the last minute (graphically in a treeview window)
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# List changed files during the last minute (graphically in a treeview window)
import gtk, commands
class PyApp(gtk.Window):
def __init__(self):
super(PyApp, self).__init__()
@initbrain
initbrain / livebox_utility.py
Last active November 4, 2023 17:35
Script de renouvellement d'adresse IP (prise en charge des Livebox 1 et 2)
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Julien Deudon (initbrain)
# Livebox_utility v0.2 du 26/09/2011
# Testé sous Windows XP SP3 (32bits) avec VirtualBox
# et sous Windows 7 Pro SP1 (64bits) grâce à Py2exe :
# https://www.initbrain.fr/static/code/Livebox_utility.rar
import urllib2, base64, re
@initbrain
initbrain / mail_addr_collector.py
Created September 19, 2013 22:30
Collecteur d'adresses email (très commenté)
#!/bin/env python
# -*- coding:utf-8 -*-
# Julien Deudon (initbrain)
import os
import urllib
import re
os.system("clear") # Nettoyage de la console
@initbrain
initbrain / xchat_lmgtfy.py
Created September 19, 2013 22:37
XChat Script (IRC client) - Make an "Let me Google That For You" url and send it to current channel
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import xchat, urllib
__module_name__ = "pyLmgtfy"
__module_version__ = "0.1"
__module_description__ = "Make an \"Let me Google That For You\" url and send it to current channel"
__module_author__ = "initbrain"
@initbrain
initbrain / urlquery_parser.py
Last active March 8, 2018 14:16
urlquery.net parser
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from lxml.etree import tostring
from lxml.html import fromstring
import urllib2
def req(url, http_proxy=None, timeout=30, retry=2):
result = None
@initbrain
initbrain / get_env_addr.c
Created September 20, 2013 16:54
get env addr
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
char ptr;
printf("%s is located at: %p\n", argv[1], getenv(argv[1]));
printf("%s was found at the address.\n", ptr);
}
@initbrain
initbrain / ripe_search_browser.py
Last active December 14, 2018 09:59
RIPE Database - Full Text Search Scraper (using QtWebKit.QWebView from PySide)
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import re
from PySide import QtCore, QtGui, QtWebKit
class Browser(QtGui.QMainWindow):
def __init__(self):
@initbrain
initbrain / google_pic_search.py
Created October 8, 2013 16:19
Script permettant d'effectuer des recherches d'images sur Google
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Pour les tests :
# python google_pic_search.py -l https://twimg0-a.akamaihd.net/profile_images/2298747498/n9hzj4nx98tgsxnpdagd.png
# python google_pic_search.py -i /home/initbrain/Images/initbrain.png
# Importations
import sys
import os