Skip to content

Instantly share code, notes, and snippets.

@pavellishin
pavellishin / gist:1049084
Created June 27, 2011 15:23
The Coming Technological Singularity: How to Survive in the Post-Human Era

The Coming Technological Singularity: How to Survive in the Post-Human Era

Vernor Vinge Department of Mathematical Sciences San Diego State University

                                  Abstract

Within thirty years, we will have the technological

@pavellishin
pavellishin / snowjob.py
Created December 22, 2011 15:45 — forked from sontek/snowjob.py
Make your terminal snow with python
#!/usr/bin/env python
import os
import random
import time
import platform
snowflakes = {}
try:
# Windows Support
@pavellishin
pavellishin / snowjob.py
Created December 22, 2011 15:47
Make your terminal snow with python
#!/usr/bin/env python
import os
import random
import time
import platform
snowflakes = {}
try:
# Windows Support
@pavellishin
pavellishin / bottles.sh
Created January 30, 2012 20:38
Bottles of Beer.
p() { s='';[ $1 != 1 ]&&s='s';echo $1 bottle$s of beer$2;};a=" on the wall";for x in {99..1};do y=$[$x-1];p $x "$a, ";p $x ". Take one down pass it around, ";p $y "$a.";done
# 173 chars, shitty wrapping.
@pavellishin
pavellishin / start.sh
Created February 2, 2012 17:36
Start up my dev environment, yo.
#! /usr/bin/env bash
start_cmd="sudo -p 'Enter password to launch XAMPP: ' /Applications/XAMPP/xamppfiles/xampp restart;\
sudo /Applications/XAMPP/xamppfiles/xampp stopftp;\
sudo /Applications/XAMPP/xamppfiles/xampp startmemcached;\
tmux select-window -t netomat:code
"
dir_ms="/Users/pavel/Documents/netomat/mobilityserver"
dir_msa="/Users/pavel/Documents/netomat/msadmin"
@pavellishin
pavellishin / gist:1986703
Created March 6, 2012 15:03
rst2html.py trying to htmlize symfony2 docs
[2012-03-06 10:03:09] pavel@addison:~/Documents/netomat/symfony-docs
# rst2html.py index.rst
index.rst:7: (ERROR/3) Unknown interpreted text role "doc".
index.rst:9: (ERROR/3) Unknown directive type "toctree".
.. toctree::
:hidden:
quick_tour/index
function check_straight($hand) {
$h=$hand;natsort($h);$h=str_replace(str_split('hdcs'),'',implode($h));return strpos('2345a2345678910jq910jkq10ajkq', $h)>-1;
}
<style class="headstyle">
div.ms-touch-Index {
background-color: #566b89;background-image: none; color: #000000;
font-size: small;
}
</style>
<div class="ms-touch-Index">