Skip to content

Instantly share code, notes, and snippets.

@javiervivanco
javiervivanco / gist:3244516
Created August 3, 2012 04:58
Simple Detection IE Javascript
if ('__proto__' in {}) {
// IS NOT IE
} else {
// IS IE
}
@javiervivanco
javiervivanco / gist:4017425
Created November 5, 2012 14:21
php connect
<?php
$r = mysql_connect($host, $user,$PASS);
$query = mysql_query('SELECT name FROM USER',$r)
mysql_query('INSERT user VALUES (1,2,3,)',$r)
while($row = mysql_fetch_assoc($query)){
@javiervivanco
javiervivanco / gist:7fec69c51152ece265e0
Created September 1, 2014 13:36
Definir un tipo array para Server NuSoap
<?php
// ... Server NuSoap
$server->wsdl->addComplexType(
'Product',
'complexType',
'struct',
'all',
'',
array(
#/bin/bash
# Usage info
show_help() {
cat << EOF
Usage: ${0##*/} [-hv] [-i INSTALL_DIR]
Install PHP QA Tools
-h display this help and exit
-i INSTALL_DIR directory to install PHP QA Tools
du -sh /var/lib/docker/containers/*| sort -h| grep -v K| awk -F '/' '{print $6}'| xargs docker inspect --format='{{.LogPath}}' | xargs tee
@javiervivanco
javiervivanco / random-pass.sh
Last active June 3, 2019 13:37
random pass generator
#!/bin/bash
for i in $(seq 1 10);do openssl rand 14 -base64 ; done
# $HOME/.bash_profile
# alias random-pass='for i in $(seq 1 10);do openssl rand 14 -base64 ; done'