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
| #!/bin/sh | |
| # 'Enable access for assistive devices' must be selected in Universal Access preferences. | |
| osascript -e " | |
| try | |
| tell application \"Final Cut Pro\" to activate | |
| delay 0.5 | |
| tell application \"System Events\" |
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
| public static class ObjectToDictionaryHelper | |
| { | |
| public static IDictionary<string, object> ToDictionary(this object source) | |
| { | |
| return source.ToDictionary<object>(); | |
| } | |
| public static IDictionary<string, T> ToDictionary<T>(this object source) | |
| { | |
| if (source == null) |
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
| public class InventoryController : ApiController | |
| { | |
| private readonly IInventoryManagementService _inventoryManagementService; | |
| private readonly IUnitOfWork _unitOfWork; | |
| public InventoryController(IUnitOfWork unitOfWork) | |
| { | |
| _unitOfWork = unitOfWork; //access services | |
| _inventoryManagementService = _unitOfWork.Get<IInventoryManagementService>(); | |
| } |
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
| USE AdventureWorks | |
| GO | |
| --============== Supporting function dbo.udfGetFullQualName | |
| IF OBJECT_ID('dbo.udfGetFullQualName') IS NOT NULL | |
| DROP FUNCTION dbo.udfGetFullQualName | |
| GO | |
| CREATE FUNCTION dbo.udfGetFullQualName ( @ObjectId INTEGER ) |
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
| /* | |
| modified from original source: https://bitbucket.org/mattkotsenas/c-promises/overview | |
| */ | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| namespace Promises |
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
| function addSourceToVideo(element, src, type) { | |
| var source = document.createElement('source'); | |
| source.src = src; | |
| source.type = type; | |
| element.appendChild(source); | |
| } | |
| var video; |
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.Security.Cryptography; | |
| using System.Web; | |
| namespace DevPartners | |
| { | |
| // author: Bill Wilder, @codingoutloud | |
| // original: https://gist.github.com/4200537 | |
| public static class RandomTokenGenerator | |
| { |
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.Diagnostics; | |
| using System.IO; | |
| using System.Text; | |
| using System.Threading; | |
| using NLog; | |
| namespace CLE | |
| { | |
| /// <summary> |
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 work (Modern Encryption of a String C#, by James Tuley), | |
| * identified by James Tuley, is free of known copyright restrictions. | |
| * https://gist.github.com/4336842 | |
| * http://creativecommons.org/publicdomain/mark/1.0/ | |
| */ | |
| using System; | |
| using System.IO; | |
| using System.Text; |
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.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Security.Cryptography; | |
| static class Program | |
| { | |
| static void Run(IEnumerable<string> args) |
OlderNewer