Skip to content

Instantly share code, notes, and snippets.

View ancgate's full-sized avatar
🙂

Jefferson Bien-Aime ancgate

🙂
  • Long Island, New York
  • 11:21 (UTC -04:00)
View GitHub Profile
@dinowang
dinowang / Main.java
Last active April 2, 2021 22:05
Java program upload file to Azure Blob Storage with progress indicator
package com.cloudriches.sample;
import com.microsoft.azure.storage.CloudStorageAccount;
import com.microsoft.azure.storage.blob.CloudBlobClient;
import com.microsoft.azure.storage.blob.CloudBlobContainer;
import com.microsoft.azure.storage.blob.CloudBlockBlob;
import java.io.File;
import java.io.FileInputStream;
@daviddpatrick
daviddpatrick / UppercaseProperties.cs
Last active June 4, 2020 00:40
Set strings properties in object to uppercase with reflection in c#
var obj = new Class();
obj.GetType().GetProperties().ForEach(p =>
{
if (p.PropertyType == typeof(string) && p.GetValue(obj) != null)
p.SetValue(obj, p.GetValue(obj).ToString().ToUpper());
});
@bgromov
bgromov / git-reset-author.sh
Created June 23, 2016 17:50
Git: reset author for ALL commits
#!/bin/sh
# Credits: http://stackoverflow.com/a/750191
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME='Newname'
GIT_AUTHOR_EMAIL='new@email'
GIT_COMMITTER_NAME='Newname'
GIT_COMMITTER_EMAIL='new@email'
" HEAD