Skip to content

Instantly share code, notes, and snippets.

Avatar

Pavel Lishin pavellishin

View GitHub Profile
View something.html
<style class="headstyle">
div.ms-touch-Index {
background-color: #566b89;background-image: none; color: #000000;
font-size: small;
}
</style>
<div class="ms-touch-Index">
View gist:2654187
function check_straight($hand) {
$h=$hand;natsort($h);$h=str_replace(str_split('hdcs'),'',implode($h));return strpos('2345a2345678910jq910jkq10ajkq', $h)>-1;
}
@pavellishin
pavellishin / gist:1986703
Created Mar 6, 2012
rst2html.py trying to htmlize symfony2 docs
View gist:1986703
[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
@pavellishin
pavellishin / start.sh
Created Feb 2, 2012
Start up my dev environment, yo.
View start.sh
#! /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"
View bottles.sh
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 / snowjob.py
Created Dec 22, 2011
Make your terminal snow with python
View snowjob.py
#!/usr/bin/env python
import os
import random
import time
import platform
snowflakes = {}
try:
# Windows Support
@pavellishin
pavellishin / snowjob.py
Created Dec 22, 2011 — forked from sontek/snowjob.py
Make your terminal snow with python
View snowjob.py
#!/usr/bin/env python
import os
import random
import time
import platform
snowflakes = {}
try:
# Windows Support
@pavellishin
pavellishin / gist:1049084
Created Jun 27, 2011
The Coming Technological Singularity: How to Survive in the Post-Human Era
View gist:1049084

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