Make a snapshot first! Upgrading from 2013Q1 to 2013Q3 because I needed newer nginx.
edit the files at:
/opt/local/etc/pkg_install.conf
/opt/local/etc/pkgin/repositories.conf
module AuthHelper | |
def http_login | |
user = 'username' | |
pw = 'password' | |
request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials(user,pw) | |
end | |
end | |
module AuthRequestHelper | |
# |
Gem::Specification.new do |s| | |
# normal spec stuff above | |
s.files = `git ls-files`.split("\n") | |
# get an array of submodule dirs by executing 'pwd' inside each submodule | |
gem_dir = File.expand_path(File.dirname(__FILE__)) + "/" | |
`git submodule --quiet foreach pwd`.split($\).each do |submodule_path| | |
Dir.chdir(submodule_path) do | |
submodule_relative_path = submodule_path.sub gem_dir, "" | |
# issue git ls-files in submodule's directory and |
# zonecfg -z <uuid> | |
zonecfg:uuid> add attr | |
zonecfg:uuid:attr> set name=resolvers | |
zonecfg:uuid:attr> set type=string | |
zonecfg:uuid:attr> set value=8.8.8.8,8.8.4.4 | |
zonecfg:uuid:attr> end | |
zonecfg:uuid> verify | |
zonecfg:uuid> commit | |
zonecfg:uuid> exit | |
# vmadm reboot <uuid> |
# vmadm halt <uuid> | |
# zonecfg -z <uuid> | |
zonecfg:uuid> add dataset | |
zonecfg:uuid:dataset> set name=<zfs/path> | |
zonecfg:uuid:dataset> end | |
zonecfg:uuid> commit | |
zonecfg:uuid> exit | |
# zfs set mountpoint=legacy <zfs/path> | |
# vmadm boot <uuid> |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. |
#!/bin/bash -x | |
# based on: http://superuser.com/questions/386506/hosting-iscsi-on-smartos | |
GROUPNAME=iscsi-1 | |
TARGETNAME=iqn.2010-08.org.illumos:02:$GROUPNAME | |
LOCAL_ADDRESS=192.168.1.2 | |
svcadm enable stmf | |
svcadm enable -r svc:/network/iscsi/target:default |
# zonecfg -z <uuid> | |
# add attr | |
# set name=qemu-extra-opts | |
# set type=string | |
# set value="LXNtcCBjcHVzPTEsY29yZXM9NCx0aHJlYWRzPTI=" | |
# end | |
# commit | |
# exit | |
Then reboot the machine. The value is the base64 encoded string that will be added to the qemu-kvm options. The above is "-smp cpus=1,cores=4,threads=2", which plays nice with Windows which for some stupid reason only supports 2 cpus. |
// | |
// main.c | |
// zmq-test1 | |
// | |
// Created by Matt Connolly on 8/08/2013. | |
// | |
//#include <ZeroMQ/zmq.h> | |
#include <czmq.h> |
#import <Foundation/Foundation.h> | |
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
dispatch_queue_t qa = dispatch_queue_create("a", DISPATCH_QUEUE_SERIAL); | |
dispatch_queue_t qb = dispatch_queue_create("b", DISPATCH_QUEUE_SERIAL); | |
static void* key = &key; | |
dispatch_queue_set_specific(qa, key, (void*)1, NULL); |