Skip to content

Instantly share code, notes, and snippets.

View chvanikoff's full-sized avatar
🦄
Spawning Unicorns

Roman chvanikoff

🦄
Spawning Unicorns
View GitHub Profile
@chvanikoff
chvanikoff / prefetch_rmq
Created May 16, 2014 18:27
This script fetches and puts RabbitMQ client and common libs to deps directory. For rebar: {pre_hooks, [{'get-deps', "./prefetch_rabbit"}]}.
#!/usr/bin/env bash
function install {
url=$1
file=${url##*/}
name=${file%.*}
dest=${file%-*}
echo "Installing ${name}"
if [ -d deps/${dest} ]; then
echo "Already installed"
# defmodule Repo.Migrations.LogsHTTP do
# use Ecto.Migration
# def up do
# execute """
# CREATE TABLE logs_http(
# id serial primary key,
# request_id varchar(200),
# method varchar(8),
# path varchar(128),
pipeline :my_pipeline do
plug :change_controller_method
end
def change_controller_method(conn) do
%{controller: controller, action: action} = get_controller(conn.params)
controller = "Elixir.Myapp.#{inspect controller}" |> String.to_atom()
conn
|> controller.call(controller.init(action))
|> halt()
{
"name": "xpn",
"version": "0.0.0",
"dependencies": {
"jquery": "~2.1.4",
"bootstrap": "~3.3.5"
},
"overrides": {
"bootstrap": {
"main": [
export default class Job extends React.Component {
constructor(props) {
super(props);
this.state = {
show: true
};
}
render() {
const job = this.props.job;
return <div onClick={this.switchShow.bind(this)}>
iex(upworkfeed@127.0.0.1)1> release_handler:install_release(Vsn="0.0.2" Opts=[]) failed, Reason={'EXIT',
{which_children_failed,
[{release_handler_1,
maybe_supervisor_which_children,
3,
[{file,
"release_handler_1.erl"},
{line,
642}]},
{release_handler_1,
upstream index {
server 127.0.0.1:4200;
}
upstream app1 {
server 127.0.0.1:4201;
}
upstream app2 {
server 127.0.0.1:4202;
}
defmodule Tst do
defmacro mymacro(fname) do
quote do
def run(unquote(fname)) do
IO.inspect(unquote(fname))
end
end
end
mymacro("one")
➜ elixir git:(416bf41) make clean test
cd lib/elixir && "/Users/chvanikoff/github/elixir/rebar" clean
==> elixir (clean)
rm -rf ebin
rm -rf lib/*/ebin
rm -rf lib/elixir/test/ebin
rm -rf lib/*/tmp
rm -rf lib/mix/test/fixtures/git_repo
rm -rf lib/mix/test/fixtures/deps_on_git_repo
rm -rf lib/mix/test/fixtures/git_rebar
% sudo pypi-install diamond ~ Ubuntu-1604-xenial-64-minimal
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
running the following command in directory: deb_dist/tmp_py2dsc/diamond-4.0.451
/usr/bin/python setup.py --command-packages stdeb.command sdist_dsc --dist-dir=/tmp/tmpe7kyUb/deb_dist --use-premade-distfile=/tmp/tmpe7kyUb/diamond-4.0.451.tar.gz bdist_deb
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
running sdist_dsc
Traceback (most recent call last):
File "setup.py", line 147, in <module>