Skip to content

Instantly share code, notes, and snippets.

View ks7000's full-sized avatar
🎯
Focusing

ks7000.net.ve (#FullSnackDeveloper) ks7000

🎯
Focusing
View GitHub Profile
#!/bin/bash
#****************************************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al (et alii, here Jimmy Olano).
#
@ks7000
ks7000 / MySQL guion para respaldar.sh
Created March 6, 2020 20:22
Guión para respaldar bases de datos en MySQL Community Server 8.0.19
#!/bin/bash
# <Guión para respaldar bases de datos en MySQL Community Server 8.0.19>
# Copyright (C) <2020> <Jimmy Olano 🇻🇪>
#
# Este programa es software libre: puedes redistribuirlo y/o modificarlo
# bajo los términos de la Licencia Pública General de GNU, publicada por
# la Fundación de Software Libre, ya sea la versión 3 de la Licencia, o
# (a su elección) cualquier versión posterior.
#
# Este programa se distribuye con la esperanza de que sea útil,
@ks7000
ks7000 / html-languages.txt
Created April 19, 2019 12:29 — forked from JamieMason/html-languages.txt
HTML lang attribute / ISO language code reference / Culture names
CULTURE SPEC.CULTURE ENGLISH NAME
--------------------------------------------------------------
Invariant Language (Invariant Country)
af af-ZA Afrikaans
af-ZA af-ZA Afrikaans (South Africa)
ar ar-SA Arabic
ar-AE ar-AE Arabic (U.A.E.)
ar-BH ar-BH Arabic (Bahrain)
ar-DZ ar-DZ Arabic (Algeria)
ar-EG ar-EG Arabic (Egypt)
@ks7000
ks7000 / direccion_ip_publica.py
Last active March 6, 2022 20:35
Guion para obtener dirección IP pública con Python 2 y Python 3
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
version = sys.version[0]
if version == '2':
import urllib2 as urllib
else:
import urllib.request as urllib
@ks7000
ks7000 / vboxdrv.sh
Last active December 9, 2017 02:10
VirtualBox version 5.1 para Debian 9 "Stretch" x86 (32 bits): análisis para poder instalar este popular hipervisor bajo Kernel linux 4.13
#! /bin/sh
# Oracle VM VirtualBox
# Linux kernel module init script
#
# Copyright (C) 2006-2015 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
@ks7000
ks7000 / Write_Blocker.ps1
Created October 21, 2017 16:34
Guion para bloquear y desbloquear la escritura en dispostivos usb en Windows con Powershell.
# Script para bloquear y desbloquear la escritura en dispostivos usb.
# Autor: Francisco Palenzuela Luque @fpalenzuela
# Blog: https://aprendizdesysadmin.com/powershell_-contruyendo-nuestro-usb-write-blocker/
# Constantes y variables
$RegRutaCompleta = 'hklm:\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies'
$RegRuta = 'hklm:\SYSTEM\CurrentControlSet\Control'
$ExisteRegistro = Test-Path -path $RegRutaCompleta
#!/usr/bin/python
# coding=utf-8
#
# Copyright [2017] [Jimmy Olano, Twitter @ks7000]
#
# 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
@ks7000
ks7000 / Feliz Día del Programador y la Programadora.php
Created September 13, 2017 21:09
El día 256 de cada año se celebra nuestro día, nosotros los héores anónimos que, por ahora, escribimos código para ordenadores y motorizamos al mundo por medio de los ordenadores (ya no podemos vivir sin ellos) ¡El verdadero programador y verdadera programadora cuenta desde cero! ¡Falta agregar código para años bisiestos!
<?php
header('Content-type: text/html; charset=UTF-8');
header('Content-language: es-ve');
date_default_timezone_set("America/Caracas");
// El verdadero programador CUENTA DESDE CERO
if (date("z") == "255"){
echo "¡Feliz Día del Programador y de la Programadora! 🤓 ";
}else{
echo "Hoy es un buen día para programar 🤔 .";
}
@ks7000
ks7000 / Feliz Día del Prorgamador.py
Last active September 13, 2017 20:29
El día 256 de cada año se celebra nuestro día, nosotros los héores anónimos que, por ahora, escribimos código para ordenadores y motorizamos al mundo por medio de los ordenadores (ya no podemos vivir sin ellos) ¡Falta agregar código para años bisiestos!
#!/usr/bin/python
#-*-coding:utf-8-*-
from datetime import datetime
ahora = datetime.now()
#Si el año es bisiesto entonces el día 256 es el 12 de septiembre
if ( ahora.strftime("%j") == "256" ) :
print ("Feliz Día del Programador "+ahora.strftime("%d/%m/%Y"))
@ks7000
ks7000 / large_factorial.py
Created July 7, 2017 02:41
Calculating large factorials with Python 3
import sys
def factorial(num):
'''Return large factorial by Jimmy Olano Sayago
(GNU General Public License v3.0) '''
if num<=1:
return 1
else:
sys.setrecursionlimit(sys.getrecursionlimit()+1)
return num * factorial(num - 1)