This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Show the number of viewers of ERR ETV online TV-channel on a 7-segment LCD | |
# Built for the Raspberry Pi | |
# | |
# http://otse.err.ee/etv/ | |
# https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/blob/master/Adafruit_LEDBackpack/Adafruit_7Segment.py | |
# https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/blob/master/Adafruit_LEDBackpack/Adafruit_LEDBackpack.py | |
# https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/blob/master/Adafruit_I2C/Adafruit_I2C.py | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Sound level indicator on a 7-segment 4-digit LCD, for Raspberry Pi | |
# Uses a USB mic to measure sound level | |
# | |
# https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/blob/master/Adafruit_LEDBackpack/Adafruit_7Segment.py | |
# https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/blob/master/Adafruit_LEDBackpack/Adafruit_LEDBackpack.py | |
# https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/blob/master/Adafruit_I2C/Adafruit_I2C.py | |
# | |
# Author Ando Roots <[email protected]> 2013 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Script for blinking two LED-s connected to a Raspberry Pi | |
# | |
# Author Ando Roots <[email protected]> | |
# Created 24 Jan 2013 | |
# Usage: run from CRON every 10 minutes | |
# Link http://sqroot.eu/2013/01/pi-hacking-1-my-intro-to-the-world-of-electronics | |
import RPi.GPIO as GPIO, time, datetime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* Represents an OpenID identity | |
* | |
* @since 0.1 | |
*/ | |
class Model_User_Identity extends ORM { | |
protected $_updated_column = FALSE; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ... | |
/** | |
* Check if an employee has the training $training_id | |
* | |
* @since 2.2.3 | |
* @static | |
* @param int $employee_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pseudo-code to prove that some tickets are hackable | |
# Blog post: http://sqroot.eu/2012/05/easily-guessable-uri-s-not-a-good-idea | |
# Ticket URI, visible to the World: https://www.yyy.ee/et/checkout/printer/XXXXXX/XXXXXXX/ | |
# Make a HTTPS connection and return the status code of the URI | |
# 200 means that the ticket exists | |
def get_http_status_code(ticket_number, print_number): | |
return url.open(ticket_uri(ticket_number, print_number)).get_status() | |
# Return the full URI of the ticket |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
#!/usr/bin/python -tt | |
# A script to send SMS messages using Messente API | |
# Author Ando Roots 2011 | |
import sys | |
import urllib | |
import urllib2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.io.*; | |
/* | |
* Converts a file of English text into Pig Latin. | |
* @author Ando Roots 2011 | |
*/ | |
public class Stuffy { | |
/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
kasutajanimi=foobar # User | |
salasona=foobar # Pass | |
kaust="itk-pic" # Folder name | |
min_pic_id="440" # Min pic ID | |
max_pic_id="1000" # Max pic ID | |
wget --user-agent "ITK Notifier" --no-check-certificate --keep-session-cookies --save-cookies cookies.txt | |
--post-data="username=$kasutajanimi&pw=$salasona&Login=Logi sisse" https://itcollege.ois.ee/auth/login -O login | |
for i in `seq $min_pic_id $max_pic_id`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.*; | |
import java.awt.event.*; | |
import java.security.*; | |
import java.math.*; | |
/** | |
* A graphical Java program that calculates the MD5 has of it's input. | |
* @author anroots | |
* | |
*/ |