Skip to content

Instantly share code, notes, and snippets.

View hevertonfreitas's full-sized avatar

Heverton Coneglian de Freitas hevertonfreitas

View GitHub Profile
@otgo
otgo / activar_windows.cmd
Last active October 10, 2024 01:16
Windows 10 Activator - Activador de Windows 10
@echo off
setlocal
:: Por @otgo https://github.com/otgo
for /f "tokens=2 delims==" %%G in ('wmic os get Caption /value') do (
if not defined VersionDeWindows set VersionDeWindows=%%G
)
:: Error si no tienes Windows 10
if "x%VersionDeWindows:Windows 10=%" == "x%VersionDeWindows%" (
echo No se detecto que tengas Windows 10 instalado en tu sistema
pause
@storeman
storeman / php_unserialize_to_json.sql
Last active September 24, 2024 08:49
PHP unserialize in Postgresql to json
/**
Decode a php serialized value to json. This function only supports basic
data types:
- arrays (will always become a json object)
- booleans
- integers
- floats
- strings
- NULL
The php_unserialize(text) function is a helper function which extracts the first value
// by Erik Wrenholt
import java.util.*;
class Mandelbrot
{
static int BAILOUT = 16;
static int MAX_ITERATIONS = 1000;
private static int iterate(float x, float y)
{
@koba-ninkigumi
koba-ninkigumi / sign
Created September 24, 2012 02:02
How to make, show and verify binary signature with openssl.
自己署名証明書の作成
# Make key.pem and cert.pem
openssl req -new -days 365 -x509 -nodes -keyout key.pem -out cert.pem
証明書の内容の表示
# Show cert.pem
openssl x509 -text -noout < cert.pem
署名ファイルの作成
# Make signature
@matthewlehner
matthewlehner / autopgsqlbackup
Created July 11, 2012 16:10
Auto PostgreSQL backup script.
#!/bin/bash
#
# PostgreSQL Backup Script Ver 1.0
# http://autopgsqlbackup.frozenpc.net
# Copyright (c) 2005 Aaron Axelsen <[email protected]>
#
# This script is based of the AutoMySQLBackup Script Ver 2.2
# It can be found at http://sourceforge.net/projects/automysqlbackup/
#
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9