Skip to content

Instantly share code, notes, and snippets.

View AngelGzS's full-sized avatar
馃幆
Focusing

Angel Gonzalez AngelGzS

馃幆
Focusing
  • Avizzor Health Solutions
  • Monterrey, Nuevo Le贸n, Mexico
View GitHub Profile
@AngelGzS
AngelGzS / obfuscate.sql
Created May 20, 2022 13:12 — forked from sarchila/obfuscate.sql
Postgres obfuscate function
create or replace function shuffle(text)
returns text language sql as $$
select string_agg(ch, '')
from (
select substr($1, i, 1) ch
from generate_series(1, length($1)) i
order by random()
) s
$$;
import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
enum Enviroment { LOCAL, DEV, QA, PRODUCTION }
class AppConfig {
final String appName;
final Enviroment flavor;
final String initialRoute;
final bool debugTag;
@AngelGzS
AngelGzS / db.sh
Created November 11, 2019 17:34
Generates new BD and User
#!/bin/bash
# Bash script written by Angel Gonzalez
echo "Enter dababase name:"
read dbname
password="$(openssl rand -base64 12)"
echo "I'll create a database named: ${dbname} with password ${password}"
read confirm
/*
Copyright 2015-2016 Carnegie Mellon University
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@AngelGzS
AngelGzS / Pivoteando.sql
Last active December 20, 2015 21:38
Pivoteando sql server
Select
Presentacion,
case when [1] > 0 then cast(cast([1] as float)/cast((select count(*) as TotalClientes from TSIVE010 CLI where cverut = 1 and CLI.cveexc in (1,3) AND (CLI.estcli=0) ) as float) as decimal(10,4)) else 0 end As Ruta1,
case when [3] > 0 then cast(cast([3] as float)/cast((select count(*) as TotalClientes from TSIVE010 CLI where cverut = 3 and CLI.cveexc in (1,3) AND (CLI.estcli=0)) as float) as decimal(10,4)) else 0 end As Ruta3,
case when [4] > 0 then cast(cast([4] as float)/cast((select count(*) as TotalClientes from TSIVE010 CLI where cverut = 4 and CLI.cveexc in (1,3) AND (CLI.estcli=0)) as float) as decimal(10,4)) else 0 end As Ruta4,
case when [5] > 0 then cast(cast([5] as float)/cast((select count(*) as TotalClientes from TSIVE010 CLI where cverut = 5 and CLI.cveexc in (1,3) AND (CLI.estcli=0)) as float) as decimal(10,4)) else 0 end As Ruta5,
case when [6] > 0 then cast(cast([6] as float)/cast((select count(*) as TotalClientes from TSIVE010 CLI where cverut = 6 and CLI.cveexc
@AngelGzS
AngelGzS / gist:5059998
Created February 28, 2013 20:49
Add packages to jdownloader
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.IO;
using System.Web;
using System.Diagnostics;
using System.Threading;
@AngelGzS
AngelGzS / pruebajquery.html
Created September 4, 2012 21:24
Prueba jquery
<html>
<head>
<title>prueba</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
</head>
<body>
<script>
$(document).ready(function () {
@AngelGzS
AngelGzS / Expedienteadm.ashx.cs
Created July 13, 2012 18:02
handler ajax json
using System;
using System.Collections.Generic;
using System.Data.SQLite;
using System.IO;
using System.Runtime.InteropServices;
using System.Security.AccessControl;
using System.Security.Principal;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
@AngelGzS
AngelGzS / session.php
Created May 22, 2012 14:54
Mi clase para el manejo de Sessiones
<?php
/**
* Clase para el manejo de Sesiones - SAT
*
* Se utilizxa una tabla en la base de datos que contendra el id de la sesion,
* ip, fecha de inicio de secion agente del navegador,
* ultima acci贸n que realizo (fecha y descripcion).
*
* Asi mismo se usa una cookie para guardar el id de la sesi贸n.
@AngelGzS
AngelGzS / ab_BitShifting.py
Created May 31, 2011 06:15
Blind SQL Injection - BitShifting By AngelBroz
# -*- coding: iso-8859-1 -*-
import re
import urllib
import urllib2
import sys
import cookielib
from socket import ssl
import os
import time