install graphite (http://graphite.wikidot.com) on Amazon Linux AMI. Please fork and fix if you find an error.
sudo yum install pycairo-devel
sudo yum install python-pip
davec@Busters ~ | |
% which ec2-rdp !10511 | |
ec2-rdp () { | |
~/ec2-search.sh $1 $2 | xargs ~/rdp.sh | |
} | |
davec@Busters ~ | |
% cat ec2-search.sh !10512 | |
#!/bin/bash |
sudo yum install pycairo-devel
sudo yum install python-pip
select * from toolkitnotifications; | |
MERGE toolkitnotifications as target | |
USING ( | |
select | |
ti.N2ItemId, ti.Id as ToolkitItemId, t.UserId, GETDATE() as Created, 'UpdatedContent' as [Action] | |
FROM ToolkitItems ti | |
LEFT JOIN Toolkits t | |
ON ti.ToolkitId = t.Id | |
WHERE ti.IsDeleted = 0 |
require 'open-uri' | |
require 'json' | |
class GithubWatcher | |
ROOT_URL = 'https://api.github.com' | |
TOKEN = '[API TOKEN]' | |
def compareBranches | |
branches = JSON.parse(open("#{ROOT_URL}/repos/[ORGANIZATION]/[REPO]/branches?access_token=#{TOKEN}").read) | |
active_branches = branches.select{|b| !['master','uat','qa'].include?(b['name'])} |
.card { | |
width: 150px; | |
background-color:lightblue; | |
padding:0 10px; | |
} | |
.card h3 { | |
border-bottom: solid 2px #aaa; | |
} |
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.IO; | |
using System.Linq; | |
using Amazon; | |
using Amazon.S3; | |
using Amazon.S3.Model; | |
using N2.Engine; |
NSError *error = nil; | |
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"(?<=(?:v|i)=)[a-zA-Z0-9-]+(?=&)|(?<=(?:v|i)\\/)[^&\n]+|(?<=embed\\/)[^\"&\n]+|(?<=(?:v|i)=)[^&\n]+|(?<=youtu.be\\/)[^&\n]+" options:NSRegularExpressionCaseInsensitive error:&error]; | |
NSString *link = [post objectForKey:@"link"]; | |
NSTextCheckingResult *match = [regex firstMatchInString:link options:0 range:NSMakeRange(0, [link length])]; | |
NSString *identifier = [link substringWithRange:match.range]; | |
NSString *html = [self embedYouTube:identifier frame:webView.frame]; | |
[webView loadHTMLString:html baseURL:nil]; |
#If you're in a folder with a solution file, it'll open the solution - otherwise it'll just open Visual Studio | |
Set-Alias vs "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" | |
function vso { | |
$SolutionFile = @(gci *.sln)[0] | |
vs $SolutionFile | |
} |
public static class TapExtension { | |
public static T Tap<T>(this T obj, Action<T> block) { | |
block.Invoke(obj); | |
return obj; | |
} | |
} | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Dapper; | |
namespace Example.Data.Dapper { | |
public class MessageRepository : RepositoryBase, IMessageRepository { | |
/// <summary> | |
/// Gets a single message | |
/// </summary> |