Skip to content

Instantly share code, notes, and snippets.

View cleydson's full-sized avatar

Cleydson cleydson

  • Remote
View GitHub Profile

Keybase proof

I hereby claim:

  • I am cleydson on github.
  • I am cleydson (https://keybase.io/cleydson) on keybase.
  • I have a public key ASA5kscEH3c0Hv-bhNwdAjc_nim_f3W9iUorn2FJehMrhQo

To claim this, I am signing this object:

@cleydson
cleydson / list-all-route53-records.sh
Created August 3, 2022 16:01
List all Route 53 records using AWS CLI
for z in $(aws route53 list-hosted-zones|jq '.[] | .[] | .Id' | sed 's!/hostedzone/!!' | sed 's/"//g'); do
echo $z;
aws route53 list-resource-record-sets --hosted-zone-id $z >> recordsFile;
done
/*
Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
This file is licensed under the Apache License, Version 2.0 (the "License").
You may not use this file except in compliance with the License. A copy of
the License is located at
http://aws.amazon.com/apache2.0/
This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
@cleydson
cleydson / Set-EIP.ps1
Last active March 5, 2021 08:45
Powershell Set EIP Userdata
[CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[string[]]$EIPs
)
try {
$ErrorActionPreference = "Stop"
Start-Transcript -Path c:\cfn\log\Set-EIP.ps1.txt -Append
@cleydson
cleydson / ObjectIdConverter.cs
Created June 7, 2016 17:59
MongoDB:: Converter ObjectId to json, so you can use the attribute [JsonProperty("_id"), JsonConverter(typeof(ObjectIdConverter))] over your property.
using MongoDB.Bson;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
namespace Your.Namespace
{
public class ObjectIdConverter : JsonConverter
{
@cleydson
cleydson / TrickWcfSelfSignedCertificate.cs
Last active August 29, 2015 14:16
WCF: When you are using a self signed certificate in Development environment you can use this line.
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
@cleydson
cleydson / CssRevison.css
Last active August 29, 2015 14:15
Layout Revision CSS
* { background-color: rgba(255,0,0,.2); }
* * { background-color: rgba(0,255,0,.2); }
* * * { background-color: rgba(0,0,255,.2); }
* * * * { background-color: rgba(255,0,255,.2); }
* * * * * { background-color: rgba(0,255,255,.2); }
* * * * * * { background-color: rgba(255,255,0,.2); }
@cleydson
cleydson / gist:3611118
Created September 3, 2012 17:28
Show hidden files in Finder
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
Public Function ImportaXLS(ByVal arquivoXLS As String) As Boolean
'------------------------------------------------------
'-Função lê arquivo do excel e depois grava na tabela--
'------------------------------------------------------
Dim dsDados As DataSet
Dim daAdaptador As System.Data.OleDb.OleDbDataAdapter
Dim sql As String
Dim conexao As String
Dim conn As OleDb.OleDbConnection
Dim tabela As String
Protected Function RetornaValor(ByVal valor As Object, Optional ByVal retornoPadrao As String = "") As String
If IsDBNull(valor) Then
Return retornoPadrao
Else
Return valor
End If
End Function
'ou