This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return { | |
"name": "Ping Presence", | |
"deviceMap": [ | |
{deviceId:264}, | |
{deviceId:261} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => { | |
Console.WriteLine("Certificaat: {0}",certificate.Subject); | |
Console.WriteLine("SslPolicy: {0}",sslPolicyErrors); | |
return true; //This row is the problem. If you don't know why, I wouldn't use apps from your company! | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using MonoTouch.UIKit; | |
namespace MonoTouch.Dialog | |
{ | |
public class TintImageStringElement : ImageStringElement | |
{ | |
public UIColor TintColor { get; set; } | |
public TintImageStringElement (string caption, UIImage image):base(caption,image.ImageWithRenderingMode (UIImageRenderingMode.AlwaysTemplate)) | |
{ | |
TintColor = UIColor.FromRGB (102, 51, 102); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var service = new ExchangeService(ExchangeVersion.Exchange2007_SP1); | |
service.Url = new Uri("https://serv/EWS/exchange.asmx"); | |
service.Credentials = new NetworkCredential("001234", "PasswordForUser001234", "Domain"); | |
//Never use this part in production!! | |
//ServicePointManager.ServerCertificateValidationCallback = (object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) => | |
// { | |
// return true; | |
// }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Your nice webapp</title> | |
<!-- add from here --> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="mobile-web-app-capable" content="yes"> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> | |
<meta name="apple-mobile-web-app-title" content="iOS 8 web app"> | |
<meta name="viewport" content="initial-scale=1"> | |
</head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add the following to your themes functions.php file | |
// Off course, you should never change the parent theme and put all the changes in a child theme | |
add_action( 'phpmailer_init', 'gmail_phpmailer_init' ); | |
function gmail_phpmailer_init( PHPMailer $phpmailer ) { | |
$phpmailer->Host = 'smtp.gmail.com'; | |
$phpmailer->Port = 587; | |
$phpmailer->Username = '[email protected]'; // Full username (with @gmail.com) | |
$phpmailer->Password = 'your_secret_password'; // Your own password | |
$phpmailer->SMTPAuth = true; // Gmail requires authentication |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This describes how you can connect your ninjablock to your own mqtt server | |
# It is not the best manual, so please provide feedback | |
# First of you have to start with the "beta" image found at: https://discuss.ninjablocks.com/t/unstable-brand-new-image-for-your-block/1666 | |
# Or direct link if you must: http://ninjablocks-nightly.s3.amazonaws.com/block/ubuntu_armhf_trusty_sterling_block-unstable_2014-07-16_1044.img.gz | |
# Then put that on an sdcard (like you normally would) | |
# Put it in the ninjablock | |
# Let it boot!! | |
# power off (upon first boot it creates a ssh key (needed for enabling ssh)) | |
# power on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +svrooij is my blockchain ID. https://onename.com/svrooij |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.ComponentModel.DataAnnotations; | |
using System.ComponentModel.DataAnnotations.Schema; | |
using System.ComponentModel; | |
namespace YourNamespace | |
{ | |
[Table("Blogs")] | |
// We inherit the EntityBase class here (with Id, CreatedAt and UpdatedAt) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Text.RegularExpressions; | |
namespace YourNamespace | |
{ | |
internal static class StringExtensions | |
{ | |
//http://stackoverflow.com/questions/3652046/c-sharp-regex-to-get-video-id-from-youtube-and-vimeo-by-url | |
static readonly Regex YoutubeVideoRegex = new Regex(@"youtu(?:\.be|be\.com)/(?:(.*)v(/|=)|(.*/)?)([a-zA-Z0-9-_]+)", RegexOptions.IgnoreCase); | |
static readonly Regex VimeoVideoRegex = new Regex(@"vimeo\.com/(?:.*#|.*/videos/)?([0-9]+)", RegexOptions.IgnoreCase | RegexOptions.Multiline); | |
// Use as |
OlderNewer