This file contains 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.Collections.Generic; | |
using System.Diagnostics.Contracts; | |
using System.Web.Http.Dependencies; | |
using Ninject; | |
using Ninject.Syntax; | |
public class NinjectDependencyScope : IDependencyScope | |
{ | |
private IResolutionRoot resolver; |
This file contains 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
## .gitconfig | |
[alias] | |
dt = difftool | |
mt = mergetool | |
[diff] | |
tool = bc3 | |
[difftool] | |
prompt = false | |
[difftool "bc3"] |
This file contains 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
script type="text/javascript"> | |
simpleAJAXLib = { | |
init: function () { | |
this.fetchViaJSONP('your_url_goes_here'); | |
}, | |
fetchViaJSONP: function (url) { | |
url += '?format=jsonp&jsonp_callback=simpleAJAXLib.handleResponse'; | |
document.getElementsByTagName('body')[0].appendChild(this.jsTag(url)); | |
}, |
This file contains 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 Xamarin.Forms; | |
using System.Collections; | |
namespace YourNamespace.Views.Controls { | |
public class BindablePicker : Picker | |
{ | |
public BindablePicker() | |
{ | |
this.SelectedIndexChanged += OnSelectedIndexChanged; |
This file contains 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
Function Set-ConnectionString{ | |
[CmdletBinding(SupportsShouldProcess=$True)] | |
Param( | |
[string]$fileName="app.config", | |
[string]$connectionStringName, | |
[string]$connectionString | |
) | |
$config = [xml](Get-Content -LiteralPath $fileName) | |
This file contains 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
module BuildHelpers | |
open Fake | |
open Fake.XamarinHelper | |
open System | |
open System.IO | |
open System.Linq | |
let Exec command args = | |
let result = Shell.Exec(command, args) |
This file contains 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
#r @"Tools/FAKE/tools/FakeLib.dll" | |
#load "Tools/build-helpers.fsx" | |
#load "Tools/hockey-app-helpers-mac.fsx" | |
open Fake | |
open System | |
open System.IO | |
open System.Linq | |
open System.Text.RegularExpressions | |
open BuildHelpers |
This file contains 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; | |
namespace RsaKeyConverter.Converter | |
{ | |
public static class BytesExtensions | |
{ | |
public static string ToBase64(this byte[] bytes) | |
{ | |
return Convert.ToBase64String(bytes); | |
} |
This file contains 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.Text; | |
/// <summary> | |
/// A class for encrypting and decrypting a string into base64 format which makes it safe for transfer | |
/// between applications. | |
/// | |
/// Reference: | |
/// Based upon the javascript implementation of xxtea by: Chris Veness | |
/// www.movable-type.co.uk/tea-block.html |
OlderNewer