Skip to content

Instantly share code, notes, and snippets.

View luizvicenteps's full-sized avatar
🌍
World Citizen

LUIZ VICENTE PRESTES DA SILVA luizvicenteps

🌍
World Citizen
  • MANAUS-AM-BRAZIL
View GitHub Profile
@deeprim
deeprim / ObjectSerializer.kt
Last active June 26, 2019 22:15
Kotlin Object Serializer
import java.io.*
object ObjectSerializer {
/**
* Serialize given object into [String] using [ObjectOutputStream].
* @param obj object to serialize
* @see ObjectInputStream
* @return the serialization result, empty string for _null_ input
*/
@ericoporto
ericoporto / ywcc_ptbr.py
Created July 28, 2015 00:39
Yahoo Weather API Condition Codes in Brazilian Portuguese (Códigos do Yahoo Weather em Português - Brasil)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2015 Erico Vieira Porto
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@retgef
retgef / coderrr-s3-convert.php
Last active June 19, 2018 20:47
Converts existing attachment meta for use with https://wordpress.org/plugins/amazon-s3-and-cloudfront/
<?php
/*
Plugin Name: Coderrr S3 Conversion
Description: Converts previously uploaded attachments to work with amazon-s3-and-cloudfront plugin
Version: 0.1
Author: Brian Fegter
License: GPLv2+
*/
/**
@bitbonsai
bitbonsai / br_whois.php
Created December 16, 2013 20:36
PHP Script with cURL to query the brazilian whois database
<?php
function get_br_whois( $url, $array_fields )
{
$options = array(
CURLOPT_RETURNTRANSFER => true, // return web page
CURLOPT_HEADER => false, // don't return headers
CURLOPT_FOLLOWLOCATION => true, // follow redirects
CURLOPT_ENCODING => "", // handle all encodings
CURLOPT_USERAGENT => "PHP Whois/Curl script", // who am i
CURLOPT_AUTOREFERER => true, // set referer on redirect