Skip to content

Instantly share code, notes, and snippets.

@thevladsoft
thevladsoft / download-java8.sh
Created May 28, 2019 15:49 — forked from hgomez/download-java8.sh
wget to download Java 8
wget --continue --no-check-certificate -O jdk-8-linux-x64.tar.gz --header Cookie: oraclelicense=a http://download.oracle.com/otn-pub/java/jdk/8-b132/jdk-8-linux-x64.tar.gz
@thevladsoft
thevladsoft / simplehttpserver.py
Created January 9, 2018 13:47 — forked from csaki/simplehttpserver.py
Simple Python Http Server with Upload and Authentication
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
__version__ = "0.1"
__all__ = ["SimpleHTTPRequestHandler"]
@thevladsoft
thevladsoft / springer-free-maths-books.md
Created December 28, 2015 18:39 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of maths books available for free, here are the direct links
@thevladsoft
thevladsoft / watch
Last active August 29, 2015 14:17 — forked from lucaswerkmeister/watch
#!/bin/bash
url="${1:?Usage: $0 url [recipient...]}"
shift
sha=$(curl -s $url | shasum);
while [[ $sha = $(curl -s $url | shasum) ]]; do
sleep 15;
done
sendmail=$(type -p sendmail || { [[ -x /usr/sbin/sendmail ]] && echo /usr/sbin/sendmail || { echo "Can’t find sendmail!"; exit 1; }; });
$sendmail -F 'Website Watcher Bot' -f "bot+watcher@$HOSTNAME" "${@:-mail@$HOSTNAME}" << EOF
Subject: Website changed
# -*- coding: utf-8 -*-
"""C magic.
This is a very simple magic for compiling and importing C code with ctypes.
This derives from biteymagic.py, by Bradley Froehle:
https://gist.github.com/bfroehle/3458310
You must provide the function names you would like exported.
"""
Module for IPython to display code with TeX representation.
This makes for example the following workflow possible:
.. sourcecode:: ipython
In [1]: %load_ext py2tex
In [2]: from math import *
from PyQt4 import QtGui, QtCore
from FingerTabs import FingerTabWidget
import sys
app = QtGui.QApplication(sys.argv)
tabs = QtGui.QTabWidget()
tabs.setTabBar(FingerTabBarWidget(width=100,height=25))
digits = ['Thumb','Pointer','Rude','Ring','Pinky']
for i,d in enumerate(digits):