Skip to content

Instantly share code, notes, and snippets.

Jasmine Greenaway paladique

Block or report user

Report or block paladique

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am paladique on github.
  • I am paladique (https://keybase.io/paladique) on keybase.
  • I have a public key whose fingerprint is 855D D453 84C0 0147 6074 BFA7 D627 ED36 6457 A4E1

To claim this, I am signing this object:

@paladique
paladique / bulkcopy.cs
Last active Sep 24, 2016
For when you need to take a bunch of things and insert them into a table
View bulkcopy.cs
public bool BulkCopy(object[] things, int id)
{
var dt = new DataTable("MyTable");
dt.Columns.Add("mythings", typeof(string));
dt.Columns.Add("ID", typeof(Int32));
foreach (var item in things)
{
var row = dt.NewRow();
row[0] = item;
row[1] = id;
@paladique
paladique / S3BucketObjCreate.cs
Created Sep 29, 2016
Add a new object to an S3 Bucket
View S3BucketObjCreate.cs
public class SomeClass
{
// Change the AWSProfileName to the profile you want to use in the App.config file.
// See http://docs.aws.amazon.com/AWSSdkDocsNET/latest/DeveloperGuide/net-dg-config-creds.html for more details.
// You must also sign up for an Amazon S3 account for this to work
// See http://aws.amazon.com/s3/ for details on creating an Amazon S3 account
// Change the bucketName and keyName fields to values that match your bucketname and keyname
string bucketName = "bucketname";
string keyName = "testpage";
View Get Title and Meta Description tag from an url c#
//First you need to retrieve html source of the given url
//Get Url Title
private string UrlTitle(string url)
{
string source = HtmlSrc(url);
string title = Regex.Match(source, @"\<title\b[^>]*\>\s*(?<Title>[\s\S]*?)\</title\>", RegexOptions.IgnoreCase).Groups["Title"].Value;
return title;
}
@paladique
paladique / resources.md
Last active Apr 2, 2018
Getting started with Angular and .NET Core Web API
@paladique
paladique / CreateDocument.cs
Last active Apr 27, 2018
CosmosDB Blog Code Snippets
View CreateDocument.cs
public static async void CreateDocument<T>(T item, string collectionName) where T : Item
{
await client.CreateDocumentAsync((GetCollectionUri(collectionName)), item);
}
You can’t perform that action at this time.