This file contains 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
/******************************************************************************* | |
(C)2010 Samuele ~redShadow~ Santi - http://www.hackzine.org | |
Under GPL v3 | |
*******************************************************************************/ | |
$content['type'] = array ( | |
'name' => 'Bookmark', | |
'type' => 'bookmark_link', |
This file contains 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 | |
# | |
# SVG Image Tiler - transform SVG images into PNG tiles | |
# Copyright (C) 2009 Samuele ~redShadow~ Santi | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |
This file contains 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
$ time python parse.py | |
real 0m0.065s | |
user 0m0.060s | |
sys 0m0.000s | |
$ md5sum out* | |
f43b4dd719f7d0c11012061b50dd96a8 out1.txt | |
169344f96bf67ce3dcd585802f116c05 out2.txt |
This file contains 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 | |
## Generate sine table | |
import math | |
def rescale(X,A,B,C,D,force_float=False): | |
retval = ((float(X - A) / (B - A)) * (D - C)) + C | |
if not force_float and all(map(lambda x: type(x) == int, [X,A,B,C,D])): | |
return int(round(retval)) |
This file contains 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 | |
from random import randint,choice | |
def slrgen(start=None,mindelta=0,maxdelta=5,minval=0,maxval=1000): | |
if start is not None: | |
s = int(start) | |
else: | |
s = randint(minval,maxval) | |
while True: |
This file contains 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
""" | |
Nicely format tables for CLI output | |
:author: Samuele Santi <[email protected]> | |
:created: 2012-05-09 | |
""" | |
import os | |
import textwrap | |
def have_color_support(): |
This file contains 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 | |
import sys | |
try: | |
text = sys.argv[1] | |
except: | |
print "Usage: rot13 <text>" | |
sys.exit(1) |
This file contains 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 | |
##---------------------------------------------------------------------- | |
## Keep the temperature down, for Thinkpads | |
## | |
## Useful for people that prefer the computer noisy than | |
## red hot. | |
## When a MAX temperature is reached, the fan speed is raised | |
## to its maximum power until the temperature drops below | |
## another MIN thresold. |
This file contains 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
""" | |
Fade IN/OUT some text.. | |
""" | |
import sys | |
import time | |
import pygame | |
## Show some text fade in/out |
This file contains 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
""" | |
Fade IN/OUT some text.. | |
""" | |
import sys | |
import time | |
import pygame | |
## Show some text fade in/out |
OlderNewer