Skip to content

Instantly share code, notes, and snippets.

lbtest
joewilliams@github-lb3b-cp1-prd:~$ sudo su -
github-lb3b-cp1-prd.iad ~ # ./cibuild
================ running tests for github.com against 192.30.252.128 ================
test: [github.com] http port ... OK
@joewilliams
joewilliams / async_nif.h
Created December 10, 2012 20:48 — forked from gburd/async_nif.h
Technique for running Erlang NIFs functions asynchronously, not on scheduler threads.
/*
*
* async_nif: An async thread-pool layer for Erlang's NIF API
*
* Copyright (c) 2012 Basho Technologies, Inc. All Rights Reserved.
* Author: Gregory Burd <greg@basho.com> <greg@burd.me>
*
* This file is provided to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain
@joewilliams
joewilliams / sudo.sh
Created November 12, 2012 19:23 — forked from boorad/sudo.sh
sudo to sesudo
#!/bin/bash
declare -a args
while [ $# -gt 0 ] ; do
case "$1" in
-n) shift ;;
*) args=("${args[@]}" "$1") ; shift ;;
esac
done
-module(genappup).
-export([run/1]).
run(OldReleaseDir) ->
%% Get the release name and version
{Name, _Ver} = get_release_name(filename:join(["rel", "reltool.config"])),
%% Get lists of the old and new app files
%% @doc Dynamic hooks intended to be called from packaging systems.
%% Includes routines for starting, stopping, upgrading, and downgrading
%% applications. Automatically generates requisite .appup files (only if
%% they don't exist already).
%% @end
-module (erlrcdynamic).
-export ([
make_appup/5
]).
{
"id": "0123456789abcdef",
"name": "myname",
"provider": "puppet",
"role": "some_identifier_from_cm_system_can_be_nil?",
"timestamp": 1290616560,
"provisioned": "true",
"os": {
"name": "linux",
"version": "2.6.35-22-generic",
cp -R path/to/old/release app_0.9
cp -R path/to/new/release app_1.0
cp app_1.0/releases/1.0/app.rel app_1.0.rel
LIBPATH="app_0.9/releases/*/ */lib/*/ebin"
erl +Bd -noinput -noshell -pa $LIBPATH -eval 'systools:make_relup("app_1.0", ["app"], ["app"])' -run init stop
erl +Bd -noinput -noshell -pa $LIBPATH -eval 'systools:make_script("app_1.0", [] )' -run init stop
erl +Bd -noinput -noshell -pa $LIBPATH -eval 'systools:make_tar("app_1.0")' -run init stop
tar zxvf app_1.0.tar.gz
cp app_1.0/releases/1.0/start_clean.boot releases/1.0/
cd releases/1.0/
<?xml version="1.0" encoding="UTF-8"?>
<geocheck>
<status>not-valid</status>
</geocheck>
<proxycheck>
<status>false</status>
</proxycheck>
/*
mostly stolen from:
http://github.com/bagder/curl/blob/master/docs/examples/http-post.c
to compile:
gcc -lcurl post.c -o post
*/