Skip to content

Instantly share code, notes, and snippets.

View jguadagno's full-sized avatar

Joseph Guadagno jguadagno

View GitHub Profile
@jguadagno
jguadagno / Emailer.cs
Last active May 17, 2017 23:48
SendGrid - ReplyTo for Hotmail.com
string apiKey = ConfigurationManager.AppSettings["SendGrid.ApiKey"];
var sendGrid = new SendGridClient(apiKey);
var msg = new SendGridMessage();
msg.SetFrom(new EmailAddress("noreply@yourdomain.com", "No Reply"));
msg.AddTo(new EmailAddress("reciever@theirdomain.com", "Joe Dirt"));
msg.SetSubject("Hello World");
msg.AddContent(MimeType.Text, "Hello World");
msg.AddContent(MimeType.Html, <html><body>My Body</body></html>);
@jguadagno
jguadagno / twbsFlickrCarousel.js
Created April 26, 2018 00:27
Twitter Bootstrap Flickr Carousel plugin
$('#flickr-carousel').twbsFlickrCarousel(
{
tagsToSearchFor: 'mvpsummit,mvp2013,mvp13',
flickrApiKey: 'insert your key here',
paginationSelector: '#flickr-pagination'
}
);
@jguadagno
jguadagno / bootstrap-theme-switch.html
Created April 27, 2018 13:09
Bootstrap Theme Switcher - HTML
<html lang="en">
<head>
<!-- Bootstrap core CSS -->
<link rel="stylesheet"
href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet"
href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">
<link id="bootstrapTheme" rel="stylesheet"
href="http://netdna.bootstrapcdn.com/bootswatch/3.1.1/cerulean/bootstrap.min.css">
<link rel="stylesheet"
@jguadagno
jguadagno / bootstrap-theme-switch-div.html
Created April 27, 2018 13:11
Bootstrap Theme Switcher - DIV
<div class="container">
<div class="navbar-header">
<button class="navbar-toggle">
<span class="sr-only">Toggle navigation</span>
</button>
<a class="navbar-brand" href="index.html">Intro to Twitter Bootstrap</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="dropdown"><a class="dropdown-toggle" href="#">Bootstrap Site </a>
@jguadagno
jguadagno / bootstrap-theme-switch.js
Created April 27, 2018 13:12
Bootstrap Theme Switch - Javascript
$().ready(function() {
/* For theme switching */
var themeName = $.cookie("themeName");
var themePath = $.cookie("themePath");
if (themeName !== undefined) {
setTheme(themeName, themePath);
}
});
function setTheme(themeName, themePath) {
@jguadagno
jguadagno / ViewSwitcher.html
Created April 27, 2018 15:22
ASP.NET FriendlyUrls ViewSwitcher and jQuery Mobile
<%@ Register Src="~/ViewSwitcher.ascx" TagPrefix="friendlyUrls" TagName="ViewSwitcher>
<!– Add this where you want the control displayed –/>
<friendlyUrls:ViewSwitcher ID="ViewSwitcher1" runat="server" />
@jguadagno
jguadagno / ViewSwitcher.js
Created April 27, 2018 15:23
ASP.NET FriendlyUrls ViewSwitcher and jQuery Mobile
data-ajax="false"
@jguadagno
jguadagno / foursquare-autocomplete-jquery-plugin.js
Created April 27, 2018 15:39
Foursquare Autocomplete jQuery Plugin
$(&quot;#venue&quot;).foursquareAutocomplete({
'latitude': 47.22,
'longitude': -122.2,
'oauth_token': &quot;your oauth token&quot;,
'minLength': 3,
'search': function (event, ui) {
$('#venue-name').html(ui.item.name);
$('#venue-id').val(ui.item.id);
$('#venue-address').html(ui.item.address);
$('#venue-cityLine').html(ui.item.cityLine);
@jguadagno
jguadagno / GooglePlusOneExtension.cs
Created April 27, 2018 15:46
Add Google Plus One Extension to BlogEngine.NET
[Extension(
"Adds the Google Plus One to your blog Posts",
"1.0",
"<a href=’https://www.josephguadagno.net’>Joseph Guadagno</a>",
800)]
@jguadagno
jguadagno / GooglePlusOneExtension-settings.cs
Created April 27, 2018 15:51
Add Google Plus One Extension to BlogEngine.NET
var settings = new ExtensionSettings(ExtensionName)
{Help = "Adds Google Plus One to your Post Home page and Post page", IsScalar = true};
settings.AddParameter("size", "Size", 20, false, false, ParameterType.ListBox);
settings.AddValue("size", new[] { "standard", "small", "medium", "tall" }, 'standard');
ExtensionSettings = ExtensionManager.InitSettings(ExtensionName, settings);