Skip to content

Instantly share code, notes, and snippets.

@damonp
damonp / colorps1.sh
Last active August 29, 2015 14:02
Red Root Prompt
Create /etc/profiles.d/colorps1.sh
#!/bin/bash
if [ $(id -u) -eq 0 >/dev/null 2>&1 ]; then
export PS1="\[\033[01;31m\]\u\[\033[00;37m\]@\h:\w\$ "
fi
@damonp
damonp / passgen.sh
Created May 25, 2014 22:13
Random password generator. Takes optional length parameter.
#!/bin/bash
# random password generator by typedeaF
# This program has no "real" value other than introducing some bash concepts and putting them to use.
# to strip the comments: cat this.file | grep -v '^# '
# Sets the maximum size of the password the script will generate
#MAXSIZE=16
MAXSIZE="${1:-16}"
/**
* Magento EAV Entity Inspection
* Inspect Category
*/
SET @entityid = '3';
SELECT ea.attribute_id, ea.attribute_code, eav.value AS 'value', 'varchar' AS 'type'
FROM catalog_category_entity e
JOIN catalog_category_entity_varchar eav
ON e.entity_id = eav.entity_id
@damonp
damonp / coinex.rb
Created February 21, 2014 17:28
Coinex.pw API Ruby Authentication
require 'curb'
require 'openssl'
require 'base64'
def coinex_call(url, data)
coinex_key = ''
coinex_secret = ''
if data != ''