Skip to content

Instantly share code, notes, and snippets.

💭
Head in the Clouds

Colin Nelson orthros

💭
Head in the Clouds
  • Seattle
Block or report user

Report or block orthros

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View validPR.json
{
"pull_request" : {
},
"action": "opened"
}
View updateBounty.sql
begin tran
if exists (select * from dbo.BountyfulUsers with (updlock,serializable) where dbo.BountyfulUsers.UserName = '#[payload.userId]')
begin
update dbo.BountyfulUsers set BountiesCompleted += 1
where dbo.BountyfulUsers.UserName = '#[payload.userId]'
end
else
begin
insert into dbo.BountyfulUsers (UserName, BountiesCompleted)
values ('#[payload.userId]', 1)
View mulesoftBounty.xml
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:db="http://www.mulesoft.org/schema/mule/db" xmlns:dw="http://www.mulesoft.org/schema/mule/ee/dw" xmlns:metadata="http://www.mulesoft.org/schema/mule/metadata" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/dw http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd
http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xs
View dashboardView.cs
@model IEnumerable<BountyCount.BountyfulUser>
@{
ViewBag.Title = "Dashboard";
}
<h2>Top Bounty Hunters!</h2>
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.UserName)
</th>
View bountyDashboardController.cs
public class DashboardController : Controller
{
UserBounty db = new UserBounty();
// GET: Dashboard
public ActionResult Index()
{
var topUsers = db.Users
.OrderByDescending(x => x.BountiesCompleted)
.Take(10);
@orthros
orthros / bountyfulUser.cs
Last active Jun 28, 2017
Class for a user bounty
View bountyfulUser.cs
public class BountyfulUser
{
public int Id { get; set; }
public string UserName { get; set; }
public int BountiesCompleted { get; set; }
}
@orthros
orthros / isseEvent.json
Created Jun 28, 2017
GitHub Issue Event
View isseEvent.json
{
"action": "created",
"issue": {
"url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/2",
"labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/2/labels{/name}",
"comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/2/comments",
"events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/2/events",
"html_url": "https://github.com/baxterthehacker/public-repo/issues/2",
"id": 73464126,
"number": 2,
You can’t perform that action at this time.