- Create
virtualenv, command refer tovirtualenvwrapper
$ mkvirtualenv cheeseshop
- Once created
(cheeseshop) $ pip install -U pip setuptools wheel pypiserver passlib
| #!/bin/bash | |
| DOMAIN=$1 | |
| PORT=$2 | |
| if [ $# -eq 0 ] ; then | |
| echo "No arguments supplied" | |
| echo "Usage: clito DOMAIN PORT" | |
| exit 1 | |
| fi |
| <textarea name="my-xml-editor" data-editor="xml" rows="15"></textarea> | |
| ... | |
| <textarea name="my-markdown-editor" data-editor="markdown" rows="15"></textarea> | |
| ... | |
| <script src="//d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js"></script> | |
| <script> | |
| // Hook up ACE editor to all textareas with data-editor attribute | |
| $(function () { |
| import logging | |
| import os | |
| import time | |
| import traceback | |
| # pip install slackclient | |
| from slackclient import SlackClient | |
| #!/usr/bin/env python | |
| from type_checked_entities import entity_factory | |
| Giraffe = entity_factory( # let's define what is a giraffe! | |
| "giraffe", | |
| name=str, # my name is a string | |
| age=float, # my age is an int | |
| eats=object, # I eat pretty much everything. | |
| ) |
| #!/usr/bin/env python | |
| """Command line script to convert a file, usually an image, into a data URI | |
| for use on the web.""" | |
| import base64 | |
| import mimetypes | |
| import os | |
| import sys | |
| import sys, marshal, functools, subprocess | |
| child_script = """ | |
| import marshal, sys, types; | |
| fn, args, kwargs = marshal.load(sys.stdin) | |
| marshal.dump( | |
| types.FunctionType(fn, globals())(*args, **kwargs), | |
| sys.stdout) | |
| """ |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import io | |
| class File(io.FileIO): | |
| def __init__(self, name, mode='r', closefd=True, **kwargs): | |
| self.wf = kwargs.pop('wf', True) | |
| super(File, self).__init__(name, mode, closefd) |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| PASSWORD_PATH = ".password" | |
| PASSWORD_ID_PATH = ".password_id" | |
| # Make sure to have installed vagrant-triggers plugin | |
| # > vagrant plugin install vagrant-triggers | |
| # After the first `vagrant up` stop the VM and execute the following steps |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant.configure(2) do |config| | |
| config.vm.box = "ubuntu/trusty64" | |
| config.vm.box_check_update = false | |
| config.vm.hostname = 'brespio.local' | |
| config.vm.network "private_network", type: "dhcp" | |
| config.vm.synced_folder '.', '/vagrant', nfs: true |
virtualenv, command refer to virtualenvwrapper$ mkvirtualenv cheeseshop
(cheeseshop) $ pip install -U pip setuptools wheel pypiserver passlib