Skip to content

Instantly share code, notes, and snippets.

View compermisos's full-sized avatar

Jesus Christian Cruz Acono compermisos

  • Tlaxcala, Mexico
View GitHub Profile
@compermisos
compermisos / pi.out
Created November 4, 2014 04:06
Pi to string base 64
NOb1iYOfltZqlfOxbTS75mcKJ6Tgwr7W7Q06b08iVb3vYhUQ6ORNPVyfRd2u9lr8ex6Ve817nQbvKQs2TJa1cUUJ370tVdY2c3QfrbQ9K27gr9bu4vWkVNe1aL1Zas0U2bh8hVJsqZ0RMmj7Z2wNL98sW026e3XQvQz9TfbcYna710jNb7381Md15vR42zMTN5ydOK8dg586j577S19UVK9QcZKOe5KUv7r0ki0Je3iRUKaXYLacQS1SwLhg3g0r640dV2Mdd eVukS72Qh8dk2M5mU7LceLKWT3vRtL5nyf054L7sZi8RMUMMpKMY8a9 7N8N4r91Vw1q1t2eUkJxOVO4b6bip1i4KUc2S8VnhoQ7QjcMu7di8yW7UMwiihkcN4iy5ge9bP9 R7xXsd3h58dZpzW8Ygr4xiZSeRQ7103MNlKbV6KgTSQp6QQL5N937R1w4bK249K74b XW1NKcKS5NR5N5fQLZP2M0SaW2KS79U0TSYl9z5TJ1v6 aX1c91lRafRddSz311Uc4i590YiolaXgUMzSuaey3JU8psox57xRegK498N3XZK9SQKtktwmeb3640bM13Km0hvRnLUS98i 6L8JuJRSpe3fSYtLNkrdvY1OMuZT744Kh00842TYZ5wLcejM2YYOU4KU05522n63QxSiKYgRq0i6LnXJfuf aoiaZ4ZiVO3RiuQ 89hQU0LSbsVexdb9Rgs363wSU5wsX65Zi4Zb8JOK9dc3fK1hwWTa3f2jv61waSXRhOM14 5PJZ2YaVYyQTQ5t8Y9MMacP0Q06819sXabQfQUu8i1orS94UvPM9O9z3Ugu5oTd4qUWfm7moqgsuLXPVYRhi5v309bSVUTaYxYp4XL7O4d8P1t44hVaWaaN8UNqSRO3g2Qso0elSN 8e6P6pYLz5K9bhvf8obvVZd44XS1bxVU69R 6JpN0TmSws47W7kVf94jq7a8WtM01K9fXMY81SZsi6Mm4N2KZ9d1LnNeL5tShiYe6hYRZTzXYn
#!/bin/bash
# update the system
sudo apt-get update
sudo apt-get upgrade
# Add puppet repos
wget https://apt.puppetlabs.com/puppetlabs-release-precise.deb
sudo dpkg -i puppetlabs-release-precise.deb
sudo apt-get update
@compermisos
compermisos / network_chek.sh
Created November 4, 2011 01:07
Reboot network cards on Network Lost
#! /bin/bash
#(c)2011-2012 Jesus Christian Cruz Acono JesusChristian (At) Tequilavalley.com
#constant check network connectivity, on lost
#re-start Cards if lost are "more large"
#reboot the system.
#the script check connectivity by ping to "arbitrary IP"
######config zone######
#IP to make the ping to check, in this moment uses GOOGLE IP (google cant negate the ping)
#you can use a "domain name" to "aditional" check de dns resolv
PINGIP="64.233.169.103"
@compermisos
compermisos / gist:1356936
Last active September 28, 2015 00:37
A simple PHP Template Manager
/*please see https://github.com/compermisos/coSimpleTemplate */
/* example usage
some.php>>>
<?php
$template = new coSimpleTemplate("rute/to/archive.tpl");
$template->set("foo", "bar");
$template->set("foo2", 1);
print $template->output();
?>
rute/to/archive.tpl>>>
@compermisos
compermisos / gist:1819942
Created February 13, 2012 20:27
comparativo de cresimiento de consumo de disco duro (72 horas de separacion)
thor:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/cciss/c0d0p1 56435164 5819196 47749172 11% /
tmpfs 3060912 0 3060912 0% /lib/init/rw
udev 10240 792 9448 8% /dev
tmpfs 3060912 0 3060912 0% /dev/shm
/dev/cciss/c0d0p2 76896348 3624276 69365868 5% /var/www
thor:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/cciss/c0d0p1 56435164 6136896 47431472 12% /
@compermisos
compermisos / gist:1830383
Created February 14, 2012 20:58
upload ssh keys
#!/bin/sh
KEY="$HOME/.ssh/id_dsa.pub"
if [ ! -f ~/.ssh/id_dsa.pub ];then
echo "private key not found at $KEY"
echo "* please create it with "ssh-keygen -t dsa" *"
echo "* to login to the remote host without a password, don't give the key you create with ssh-keygen a password! *"
exit
fi
@compermisos
compermisos / MyBakup.sh
Created June 1, 2012 23:10
backup mysql db's "table a table"
#!/bin/sh
# MySQL backup script Table based
# Copyright (c) 2012 Jesus Christian Cruz Acono <JCCruz@openintelligence.mx>
# This script is licensed under GNU GPL version 2.0 or above
# ---------------------------------------------------------------------
#########################
######TO BE MODIFIED#####
### System Setup ###
@compermisos
compermisos / coSimpleContentCleaner.php
Created June 4, 2012 17:29
a coSimpleContentCleaner
<?php
/*
coSimpleContentCleaner is a simple class to clean user imput from XSS and SQL injection atack
coSimpleContentCleaner is a work in progress.
a simple example
<?php
$clean = new coSimpleContetnCleaner();
@compermisos
compermisos / changepassword.php
Created October 4, 2012 03:00 — forked from mattrude/changepassword.php
LDAP PHP Change Password Page
<?php
/**
* LDAP PHP Change Password Webpage
* @author: Matt Rude <http://mattrude.com>
* @website: http://technology.mattrude.com/2010/11/ldap-php-change-password-webpage/
*
*
* GNU GENERAL PUBLIC LICENSE
* Version 2, June 1991
@compermisos
compermisos / .travis.yml
Created April 4, 2013 22:02
Travis-ci.org base definition to proyects use Phix
language: php
php:
- 5.4
- 5.3
matrix:
  allow_failures:
    - php: 5.5