Skip to content

Instantly share code, notes, and snippets.

@marcellmars
marcellmars / Public library
Last active December 23, 2015 18:49
Public library
**PUBLIC LIBRARY**
----------
<img src="http://i.imgur.com/XlLRZBN.png"width="320"/>
[TOC]
## <a id="infrastructure"></a>Public Library (as infrastructure) ##
### Context ###
## CONTEXT ##
It’s a simple idea: public library is one of those almost invisible infrastructures that we start to notice only once they go extinct. A place where all people can get access to all knowledge that can be collected. In the past it relied on the limited resources of rich patrons or unstable budgets of (welfare) states. With internet, as in many other instances, the dream about universal access got much more imaginable. It seemed just an issue of interpreting when the trajectory curves of global personal computer distribution and internet access penetration would finally make universal access to knowledge a reality. However, the actual trajectory of development of public libraries in the age of internet are pointing in the opposite direction – that the phenomena we people are most proud of are being undercut and can easily go extinct.
Public libraries now cannot receive, and sometimes not even buy, the books of some of the largest publishers. The books that they already hold they must destroy aft

What

books. soon.

Requirements

  • a server with a public ip (1.2.3.4 in this document)
@marcellmars
marcellmars / checkmemory.py
Created February 19, 2012 13:43
Check total memory and if used more than 3.0GB and make desktop notification with programs which use more than 2.0GB
#!/usr/bin/env python2
import commands, pynotify, sys, os, time
while 1:
lines = commands.getoutput('sudo ps_mem.py').split('\n')
total = [float(str(l).split(" ")[-2]) for l in lines if l.startswith(" ") and l.find("GiB")]
progs = [str(l).split("=")[1].strip().split(" ") for l in lines if l.find("GiB") != -1 and not l.startswith(" ")]
for prog in progs:
@marcellmars
marcellmars / findyourpath.py
Created May 11, 2011 11:23
python script finds its own current path
#!/usr/bin/env python
import os
mypath = os.path.dirname(os.path.realpath(__file__))
if __name__ == '__main__':
print mypath
@marcellmars
marcellmars / jpeg_sequence2pdf.sh
Created July 29, 2010 20:28
make one pdf from bunch of jpegs (dirty, not prepared as generic script)
for i in *; do jpegtopnm $i > $i.pnm;done
for i in *.pnm;do pnmtops $i > $i.ps;done
for i in *.ps;do ps2pdf $i $i.pdf;done
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=contract.pdf -dBATCH contract002.jpg.pnm.ps.pdf contract002-1.jpg.pnm.ps.pdf contract002-2.jpg.pnm.ps.pdf contract002-3.jpg.pnm.ps.pdf contract002-4.jpg.pnm.ps.pdf