This file contains 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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
DOCUMENTATION = """ | |
--- | |
author: Aiko Mastboom | |
module: pm2.py | |
short_description: nodeJS pm2 wrapper | |
description: | |
- This module helps managing processes using pm2 on hosts |
This file contains 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
#!/usr/bin/env bash | |
#ramfs_size_mb=512 | |
ramfs_size_mb=1536 | |
origin=${HOME}/Development/ipe | |
name="iperam" | |
mount_point=${HOME}/Development/${name} | |
mkramdisk() { | |
ramfs_size_sectors=$((${ramfs_size_mb}*1024*1024/512)) | |
#ramdisk_dev=`hdid -nomount ram://${ramfs_size_sectors}` |
This file contains 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
defmodule JSONMapBuilder do | |
def to_map(list) when is_list(list) and length(list) > 0 do | |
case list | |
|> List.first do | |
{_, _} -> | |
Enum.reduce( | |
list, | |
%{}, | |
fn (tuple, acc) -> | |
{key, value} = tuple_to_key_value(tuple) |