Skip to content

Instantly share code, notes, and snippets.

Sergiy Mashtaler svmt

Block or report user

Report or block svmt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View bash_ps1_k8s dual line
NORMAL="\[\033[0m\]"
RED="\[\033[0;31m\]"
GREEN="\[\033[01;32m\]"
BLUE="\[\033[01;34m\]"
YELLOW="\[\033[0;33m\]"
function parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
View nodehelloworld
apiVersion: v1
kind: Pod
metadata:
name: nodehelloworld.example.com
labels:
app: helloworld
spec:
containers:
- name: k8s-demo
image: wardviaene/k8s-demo
View gist:bf375924bb3457e673653e1b0061161c
wmic path softwarelicensingservice get OA3xOriginalProductKey
View gist:af50c54d27896ad9e7cb6d51c86cf7da
Using dig with OpenDNS as resolver:
dig +short myip.opendns.com @resolver1.opendns.com
Perhaps alias it in your bashrc so it's easy to remember
alias wanip='dig +short myip.opendns.com @resolver1.opendns.com'
Responds with a plain ip address:
$ wanip
80.100.192.168
View gist:beffe00d4e26b530f4f34ec63f05f39d
PHP Extension curl.
PHP Extension dom.
PHP Extension mcrypt.
PHP Extension simplexml.
PHP Extension spl.
PHP Extension xsl.
PHP Extension intl.
PHP Extension mbstring.
PHP Extension ctype.
PHP Extension hash.
@svmt
svmt / php_function_disable
Last active Oct 20, 2016
List of potentially dangerous functions
View php_function_disable
disable_functions = dl, exec, shell_exec, system, passthru, popen, pclose, proc_open, proc_nice, proc_terminate,
proc_get_status, proc_close, pfsockopen, leak, apache_child_terminate, posix_kill, posix_mkfifo,
posix_setpgid, posix_setsid, posix_setuid
Extra INFO
# Command Execution
exec - Returns last line of commands output
passthru - Passes commands output directly to the browser
system - Passes commands output directly to the browser and returns last line
You can’t perform that action at this time.