Skip to content

Instantly share code, notes, and snippets.

View gist:06b8c38cfd99663f6b7c
UPDATE magento.admin_user SET password = 'a309595a9500ee214f91ecc43bc33790:8G9PtXYBNElJegYFALFtRuFClISuZinN' WHERE username = 'admin';
View gist:677dca291148c672e4dc
<?php
require_once 'app/Mage.php';
umask(0);
/* not Mage::run(); */
Mage::app('default');
## For magento1.7 or Earlier var
//$_HASH_SALT_LENGTH = 2;
## For magento1.8 and magento1.9
$_HASH_SALT_LENGTH = 32;
View gist:19eebb18fd72750668a6
-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 06, 2015 at 05:07 PM
-- Server version: 5.5.8
-- PHP Version: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
@usmanismail
usmanismail / container-exporder
Created May 23, 2015
The output from usman/container-exporter
View container-exporder
# HELP container_blkio_io_service_bytes_recursive_total Number of bytes transferred to/from the disk by the cgroup.
# TYPE container_blkio_io_service_bytes_recursive_total counter
container_blkio_io_service_bytes_recursive_total{component="LoadBalancerAgent",container_type="system",device="vda",environment="Development",id="285bc305bc46039b4ef2f6315286fe9b124a1820acb60aea18f228187f091837",image="rancher/agent-instance:v0.3.1",name="7e49d109-8286-444c-8ce7-645a1d2d5481",op="Async",service="WebLB"} 4096
container_blkio_io_service_bytes_recursive_total{component="LoadBalancerAgent",container_type="system",device="vda",environment="Development",id="285bc305bc46039b4ef2f6315286fe9b124a1820acb60aea18f228187f091837",image="rancher/agent-instance:v0.3.1",name="7e49d109-8286-444c-8ce7-645a1d2d5481",op="Read",service="WebLB"} 0
container_blkio_io_service_bytes_recursive_total{component="LoadBalancerAgent",container_type="system",device="vda",environment="Development",id="285bc305bc46039b4ef2f6315286fe9b124a1820acb60aea
@usmanismail
usmanismail / rancher-get-info.sh
Created Mar 19, 2015
A curl wrapper to get container info from the rancher API
View rancher-get-info.sh
#!/bin/sh
usage(){
echo "Usage: $0 ACCESS_KEY ACCESS_SECRET CONATAINER_ID"
exit 1
}
# call usage() function if filename not supplied
[[ $# -ne 3 ]] && usage
View Docker Stats
{
"read": "2015-03-17T01:13:19.991994397Z",
"network": {
"rx_bytes": 1296,
"rx_packets": 16,
"rx_errors": 0,
"rx_dropped": 0,
"tx_bytes": 648,
"tx_packets": 8,
"tx_errors": 0,
View run-container.sh
#!/bin/bash
usage(){
echo "Usage: $0 RANCHER_SERVER CONTAINER_NAME IMAGE COMPUTE_NODE"
echo "e.g. $0 my-rancher.com MyContainer ubuntu 1h2"
exit 1
}
# call usage() function if filename not supplied
[[ $# -ne 4 ]] && usage
View gist:0d2ae782c4d9e59c9cdd
INFO: HOME -> ./console-agent/node_modules/forever/node_modules/nssocket/test/fixtures/ryans-cert.pem
INFO: HOME -> ./console-agent/node_modules/forever/node_modules/nssocket/examples/
INFO: HOME -> ./console-agent/node_modules/forever/node_modules/nssocket/examples/reconnect.js
INFO: HOME -> ./console-agent/node_modules/forever/node_modules/nssocket/examples/bla.js
INFO: HOME -> ./console-agent/node_modules/forever/node_modules/nssocket/examples/foo.js
INFO: HOME -> ./console-agent/node_modules/forever/node_modules/nssocket/examples/verbose-protocol.js
INFO: HOME -> ./console-agent/node_modules/forever/node_modules/nssocket/examples/simple-protocol.js
INFO: HOME -> ./console-agent/node_modules/forever/node_modules/nssocket/package.json
INFO: HOME -> ./console-agent/node_modules/forever/node_modules/nssocket/README.md
INFO: HOME -> ./console-agent/node_modules/forever/node_modules/nssocket/LICENSE
View gist:1056fdd52e6d68f3a97f
docker logs c93bcc339c5c
INFO: Downloading agent http://172.30.0.129:8080/v1/configcontent/configscripts
INFO: Updating configscripts
INFO: Downloading http://172.30.0.129:8080/v1//configcontent//configscripts current=
INFO: Running /var/lib/cattle/download/configscripts/configscripts-1-7712505358f4b8b85279cf276bf64f83b7bb639e5d669a6d2b215722d76fc1d4/apply.sh
INFO: Sending configscripts applied 1-7712505358f4b8b85279cf276bf64f83b7bb639e5d669a6d2b215722d76fc1d4
INFO: Updating agent-instance-startup
INFO: Downloading http://172.30.0.129:8080/v1//configcontent//agent-instance-startup current=
INFO: Running /var/lib/cattle/download/agent-instance-startup/agent-instance-startup-2-2ad286ad710445cf6a07c6e010c784c1831a666144d1251f2a3dce77012966b7/apply.sh
INFO: Updating services
View gist:15b5ab7b356eb4ed7856
docker logs c5da48e520b9
CATTLE_API_UI_INDEX=http://cdn.rancher.io/ui/0.8.10/static/index.html
CATTLE_DB_CATTLE_MYSQL_HOST=
CATTLE_DB_CATTLE_MYSQL_PORT=
CATTLE_GRAPHITE_HOST=
CATTLE_GRAPHITE_PORT=
CATTLE_HOME=/var/lib/cattle
CATTLE_LOGBACK_OUTPUT_GELF_HOST=
CATTLE_LOGBACK_OUTPUT_GELF_PORT=
[BOOTSTRAP] Starting Cattle