Skip to content

Instantly share code, notes, and snippets.

Max J. Rodriguez B. Jaxmetalmax

Block or report user

Report or block Jaxmetalmax

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 fileCopy.cs
// FROM http://www.codeproject.com/Tips/777322/A-Faster-File-Copy
/// <summary> Time the Move
/// </summary>
/// <param name="source">Source file path</param>
/// <param name="destination">Destination file path</param>
public static void MoveTime (string source, string destination)
{
DateTime start_time = DateTime.Now;
FMove (source, destination);
long size = new FileInfo (destination).Length;
View SendMailLogFile.cs
public static void EnviaCorreoInterno(string cAsunto, List<string> destinatarios, string cBody, List<string> cAdjuntos, int port, bool ssl, string usr, string pass, string host, string correo)
{
var mail = new MailMessage();
bool succesSend = true;
mail.From = new MailAddress(correo);
var smtp = new SmtpClient
{
Port = port,
@Jaxmetalmax
Jaxmetalmax / extract.sh
Created Dec 28, 2014
extract files linux
View extract.sh
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) rar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
View ejemplosjoins.sql
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `estados`
-- ----------------------------
DROP TABLE IF EXISTS `estados`;
CREATE TABLE `estados` (
`idestado` int(11) NOT NULL,
`estado` varchar(70) NOT NULL,
PRIMARY KEY (`idestado`)
@Jaxmetalmax
Jaxmetalmax / installrubyrvmdebian.sh
Last active Feb 23, 2017
Bash Script to install RVM and ruby, can be run from vagrant to provision a develop environment (run it with start param) or can be run standalone (without params).
View installrubyrvmdebian.sh
#!/usr/bin/env bash
cd $HOME
function updateinstall(){
echo -e "Updating system and installing tools...\n"
sudo apt-get update
sudo apt-get install -y curl gnupg build-essential
View nginxopus
server {
listen 80;
root /var/www/opus/public;
index index.php;
server_name opus.misitio.com;
location / {
View keybase.md

Keybase proof

I hereby claim:

  • I am jaxmetalmax on github.
  • I am jaxmetalmax (https://keybase.io/jaxmetalmax) on keybase.
  • I have a public key ASCv2w-xYEObPu8XFrJtDtWhec_ctTCJUsHuYmBEljan7Qo

To claim this, I am signing this object:

@Jaxmetalmax
Jaxmetalmax / checkenvfiles.py
Created Jun 6, 2018
script to check variables in env files before commit
View checkenvfiles.py
import os.path
listvars=[]
listexvars=[]
varsnotlisted=[]
my_path = os.path.abspath(os.path.dirname(__file__))
filevar = os.path.join(my_path,"../../.env")
filevarex = os.path.join(my_path,"../../.env.example")
View precommit.sh
#!/bin/bash
python $(pwd)/.git/hooks/checkenv.py
if [[ $? -ne 0 ]]; then
echo -e "Check you .env files..."
exit 2;
else
exit 0;
fi
View installcheckenv.sh
#!/usr/bin/env bash
PATHGIT=$(pwd)/.git/
if [[ ! -d $PATHGIT ]]; then
echo -e "This is not a Git repo. Run it on a git repo..."
exit 2;
else
curl --output $PATHGIT/hooks/checkenv.py https://gist.githubusercontent.com/Jaxmetalmax/14199d353855730568e88d2dfc0487c6/raw/18e8642439e71ea6e14e9827889fe37efd7319d8/checkenvfiles.py
curl --output $PATHGIT/hooks/pre-commit https://gist.githubusercontent.com/Jaxmetalmax/e2644337cbd76b9bee7b129a231f89cd/raw/80fb9d924a1dd457f49ac6b1561079f7efdae20f/precommit.sh
You can’t perform that action at this time.