Skip to content

Instantly share code, notes, and snippets.

View MawCeron's full-sized avatar

Mauricio Cerón MawCeron

View GitHub Profile
@MawCeron
MawCeron / blueprint-slate.omp.json
Created March 6, 2026 22:10
Oh My Posh Theme - Blueprint Slate
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#c8d4dc",
"foreground": "#1c2127",
"leading_diamond": "\n\ue0b6",
@MawCeron
MawCeron / charizard.txt
Created March 6, 2026 22:06
ANSI Charizard
                        ▄▄                                      
                      ▄▀▀▀              ▀▀▀▄▄                   
                 ▄
@MawCeron
MawCeron / SplitString.sql
Created July 3, 2024 17:17
Split string function for SQL Server 2008
CREATE FUNCTION dbo.SplitString(
@String varchar(8000),
@Delimiter char(1),
@Column int = 1
)
returns varchar(8000)
as
begin
declare @idx int
@MawCeron
MawCeron / Eventos.cs
Created June 24, 2019 22:03
Obtener datos de SQL para llenar fullcalendar
public class cEventos
{
private static string con;
public cEventos()
{
con = ConfigurationManager.ConnectionStrings["CRMCapa"].ConnectionString;
}
internal List<CalendarEvent> ObtenerCalendario(DateTime inicio, DateTime final)
@MawCeron
MawCeron / login.cs
Created June 20, 2019 20:42
Login implementation with hash SHA512 and Salt for secure store
using System;
using System.Configuration;
using System.Data.SqlClient;
using System.Security.Cryptography;
using System.Text;
namespace Access
{
public class Login
{
@MawCeron
MawCeron / fansub.py
Last active March 28, 2019 15:00
Express subtitle translation using Google Translator
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Express subtitle translation using Google Translator
#
# Notes:
# - python fansub.py [file] [from language] [to languaje] // i.e.(python fansub.py mySubs.ass en es)
# - Only for ASS Subtitle files
# - Just for fun
# - Too slow
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Encrypts and decrypts messages using the Atbash cipher
#
#
# (c) 2014 Mauricio Cerón <maw.ceron@gmail.com>
#
def atbash(message):
@MawCeron
MawCeron / touching_files.sh
Created March 27, 2019 21:17
Bash script that changes the creation, modification or access date from multiple files
#!/bin/bash
# Changes the creation, modification and access date from multiple files
#
# Notes:
# - Limited to a simple type of file
# - Up to 99 files max
# - Works in Linux and Mac
#
# (c) 2014 Mauricio Cerón <maw.ceron@gmail.com>
#
@MawCeron
MawCeron / auto_backup.bat
Last active March 27, 2019 19:34
Creates a compressed file from desired files and sends it to another pc
::
:: Automatized file backup system
::
:: Creates a compressed file from desired files and folders and sends it to another pc
:: Notes: 7Zip needs to be installed
::
:: v. 0.4
:: (c) 2014 Mauricio Cerón <maw.ceron@gmail.com>
::
@MawCeron
MawCeron / save-video-w-opencv.py
Created October 27, 2017 17:22 — forked from keithweaver/save-video-w-opencv.py
Stream and save video in Python with OpenCV
# For more info: http://docs.opencv.org/3.0-beta/doc/py_tutorials/py_gui/py_video_display/py_video_display.html
import cv2
import numpy as np
import os
FILE_OUTPUT = 'output.avi'
# Checks and deletes the output file
# You cant have a existing file or it will through an error
if os.path.isfile(FILE_OUTPUT):