Skip to content

Instantly share code, notes, and snippets.

@alecvinent
alecvinent / Free O'Reilly Books.md
Created October 4, 2022 01:01 — forked from dongbohu/Free O'Reilly Books.md
Free O'Reilly Books

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
@alecvinent
alecvinent / select_input.py
Created July 5, 2021 13:47 — forked from atupal/select_input.py
Keyboard input with timeout in Python
import sys, select
print "You have ten seconds to answer!"
i, o, e = select.select( [sys.stdin], [], [], 10 )
if (i):
print "You said", sys.stdin.readline().strip()
else:
print "You said nothing!"
@alecvinent
alecvinent / bootstrap-db.py
Created October 19, 2018 15:47 — forked from sebalix/bootstrap-db.py
Bootstraping Odoo database (8.0)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Script to bootstrap an Odoo database (8.0)."""
import odoorpc
# Odoo connection
SUPER_PWD = 'admin'
HOST = 'localhost'
PORT = 8069
DB = 'my_db'
@alecvinent
alecvinent / doaj.php
Created August 20, 2018 20:29 — forked from phette23/doaj.php
Web Scraping Examples in a Few Languages
<?php
// need to download simple_html_dom.php from SourceForge
// http://sourceforge.net/projects/simplehtmldom/files/
// and place it in the same directory as this script
require_once( 'simple_html_dom.php' );
// http://simplehtmldom.sourceforge.net/manual_api.htm
$base = 'http://www.doaj.org/doaj?func=search&template=&uiLanguage=en&query=';
$query = urlencode( 'librarianship' );