The spec has moved to a repo: https://github.com/defunctzombie/package-browser-field-spec to facilitate collaboration.
This file contains hidden or 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
// array utils | |
// ================================================================================================= | |
const combine = (...arrays) => [].concat(...arrays); | |
const compact = arr => arr.filter(Boolean); | |
const contains = (() => Array.prototype.includes | |
? (arr, value) => arr.includes(value) | |
: (arr, value) => arr.some(el => el === value) |
This file contains hidden or 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 sublime, sublime_plugin | |
BUILD_COLOR_SCHEME = "Packages/Color Scheme - Default/Twilight.tmTheme" | |
def in_build_dir(view): | |
if not view or not view.file_name(): | |
return False | |
return "/build/" in view.file_name() | |
This file contains hidden or 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 mock | |
class GeneratorMock(mock.Mock): | |
def __init__(self, *arg, **kw): | |
kw['side_effect'] = self._side_effect | |
super(GeneratorMock, self).__init__(*arg, **kw) | |
self._lookup = {} | |
def _side_effect(self, *arg, **kw): | |
if self._mock_return_value is not mock.sentinel.DEFAULT: |
This file contains hidden or 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
Function::property = (prop, desc) -> | |
Object.defineProperty @prototype, prop, desc | |
class Person | |
constructor: (@firstName, @lastName) -> | |
@property 'fullName', | |
get: -> "#{@firstName} #{@lastName}" | |
set: (name) -> [@firstName, @lastName] = name.split ' ' | |
p = new Person 'Leroy', 'Jenkins' |
This file contains hidden or 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
from django.core.cache.backends.memcached import BaseMemcachedCache | |
class UltraMemcachedCache(BaseMemcachedCache): | |
"An implementation of a cache binding using python-ultramemcached" | |
def __init__(self, server, params): | |
import ultramemcache | |
super(MemcachedCache, self).__init__(server, params, | |
library=ultramemcache, | |
value_not_found_exception=ValueError) |
This file contains hidden or 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
# to install the latest stable version: | |
brew install scala --with-docs | |
# to install scala-2.10.0-RC1: | |
brew install https://raw.github.com/gist/3939012/scala.rb --with-docs | |
# to switch versions (from https://github.com/mxcl/homebrew/wiki/External-Commands): | |
brew switch scala 2.9.2 | |
brew switch scala 2.10.0-RC1 |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
This file contains hidden or 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
#!/bin/sh | |
# bdist_wheel demo | |
# Create environment | |
virtualenv /tmp/wheeldemo | |
cd /tmp/wheeldemo | |
# Install wheel and patched pip, distribute | |
bin/pip install -e hg+https://bitbucket.org/dholth/wheel#egg=wheel -e hg+https://bitbucket.org/dholth/distribute#egg=distribute -e git+https://github.com/dholth/pip.git#egg=pip |
-
Download and install VirtualBox
-
Download and install Vagrant
-
Clone
devstack
repositorygit clone git://github.com/openstack-dev/devstack.git
-
Switch to
devstack
directory
cd devstack
NewerOlder