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
CFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib ./configure --with-bdb=/opt/local --with-init-style=solaris --without-pam --prefix=/opt/local --with-init-dir=/var/svc/manifest/network/ --with-ssl-dir=/opt/local --with-libgcrypt --prefix=/opt/local | |
LD_OPTIONS="-D libs,detail" CFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make clean install | |
LD_OPTIONS="-D libs,detail" CC=gcc CFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make clean install | |
ls /opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.0/ | |
ln -s /opt/local/lib/libiconv.so /opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.0/ | |
LD_OPTIONS="-D libs,detail" CC=gcc CFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make clean install | |
ln -s /opt/local/lib/libwrap.so /opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.0/ | |
LD_OPTIONS="-D libs,detail" CC=gcc CFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make clean install |
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
/opt/heroku-buildpack-ruby/bin/compile . | |
-----> Using Ruby version: ruby-1.9.2 | |
-----> Installing dependencies using | |
sh: -c: line 0: unexpected EOF while looking for matching ``' | |
sh: -c: line 1: syntax error: unexpected end of file | |
sh: -c: line 0: unexpected EOF while looking for matching ``' | |
sh: -c: line 1: syntax error: unexpected end of file | |
/opt/heroku-buildpack-ruby/lib/language_pack/ruby.rb:616:in `load_bundler_cache': private method `load' called for nil:NilClass (NoMethodError) | |
from /opt/heroku-buildpack-ruby/lib/language_pack/ruby.rb:430:in `block in build_bundler' | |
from /opt/heroku-buildpack-ruby/lib/language_pack/base.rb:91:in `log' |
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
import os | |
import cherrypy | |
from cherrypy import wsgiserver | |
from my_wsgi_app import wsgi | |
PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), 'public')) | |
class Root(object): |
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
First remove the apt-get supervisor version: | |
sudo apt-get remove supervisor | |
Kill the backend supervisor process: | |
sudo ps -ef | grep supervisor | |
Then get the newest version(apt-get version was 3.0a8): |
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
zpool get all zones | |
NAME PROPERTY VALUE SOURCE | |
zones size 2.72T - | |
zones capacity 42% - | |
zones altroot - default | |
zones health ONLINE - | |
zones guid 1181797254408314611 default | |
zones version - default | |
zones bootfs - default | |
zones delegation on default |
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
# For a bunch of Python files | |
vim -c "bufdo! set eventignore-=Syntax| %s/original/replacement/gce" *.py | |
# if you want to save as you go | |
vim -c "bufdo! set eventignore-=Syntax| %s/original/replacement/gce | update" *.py | |
# Breaking it down: | |
# bufdo! -> so that it doesn't complain about erroring | |
# set eventignore-=Syntax -> so that every buffer gets syntax highlighting | |
# /gce -> optional, global search in the line with confirmation and eating up the errors |
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
# ideally we would have output like: | |
$ python process.py | |
this is an stderr line | |
this is an stdout line | |
this is an stderr line | |
this is an stdout line |
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
# app name: ayni | |
# this works, inheriting from it, committing and re-using the database | |
# | |
# ayni model __init__.py file doesn't have anything odd and can be found: | |
# https://github.com/alfredodeza/ayni/blob/master/ayni/models/__init__.py | |
# | |
import os | |
from unittest import TestCase | |
from pecan import set_config | |
from pecan.testing import load_test_app |
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
import logging | |
import threading | |
import os | |
import subprocess | |
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO) | |
class LogPipe(threading.Thread): |
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
import random | |
class Markov(object): | |
def __init__(self, open_file): | |
self.cache = {} | |
self.open_file = open_file | |
self.words = self.file_to_words() | |
self.word_size = len(self.words) |