Skip to content

Instantly share code, notes, and snippets.

View jonedmiston's full-sized avatar
💭
Rock'n

Jon Edmiston jonedmiston

💭
Rock'n
View GitHub Profile
<tr >
<td>
<div class="d-flex align-items-center">
<div>
<strong>Pete Foster</strong><br>
<small>Age: 50</small>
</div>
</div>
</td>
<style>
.dropdown-header {
display: block;
padding: 5px 16px;
font-size: 14px;
line-height: 1.5;
color: #535353;
{% execute type:'class' %}
using Rock;
using Rock.Data;
using Rock.Model;
public class MyScript
{
public string Execute() {
System.Threading.Thread.Sleep(4000);
return "";
@jonedmiston
jonedmiston / Q&A Points
Created June 16, 2017 05:51
Q&A Points
SELECT TOP (1000)
[PersonId]
,[Points]
,[VotePoints]
, [NickName]
, [Lastname]
FROM [RockRMS-Spark].[dbo].[_org_sparkDevNetwork_QandA_Author] a
INNER JOIN [Person] p ON p.[Id] = a.[PersonId]
WHERE [Points] < 10000
ORDER BY [Points] DESC
@jonedmiston
jonedmiston / Get's Slack Points
Created June 16, 2017 05:46
Get's Slack Points
SELECT TOP (1000)
dv.[Value]
,[Description]
,CONVERT(INT, av.[ValueAsNumeric]) as [Points]
FROM [RockRMS-Spark].[dbo].[DefinedValue] dv
INNER JOIN [AttributeValue] av ON av.[EntityId] = dv.[Id] AND av.[AttributeId] = 3599
WHERE [DefinedTypeId] = 74
ORDER BY [Points] desc
@jonedmiston
jonedmiston / Sort by Attribute Value
Last active April 6, 2017 21:04
Sort by Attribute Value
// note that the queryable must be ToList'ed
var sortedItems = qryGroupMembers.ToList().OrderBy(a => a.GetAttributeValue("Priortity").AsInteger())
@jonedmiston
jonedmiston / Filter By Attribute Value
Created April 6, 2017 21:01
Filter By Attribute Value
qryGroupMembers = qryGroupMembers.WhereAttributeValue( rockContext, a => a.Attribute.Key == "IsAwesome" && a.ValueAsBoolean == true );
<%@ Page Language="C#" MasterPageFile="Site.Master" AutoEventWireup="true" Inherits="Rock.Web.UI.RockPage" %>
<%@ Import Namespace="Rock.Web.UI" %>
<%@ Import Namespace="Rock.Web.Cache" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
var page = (RockPage)this.Page;
//var page = PageCache.Read(((RockPage)this.Page).PageId);
@jonedmiston
jonedmiston / Pull Request to Feature Branch
Created February 16, 2017 14:48
Pull Request to Feature Branch
git fetch origin pull/ID/head:BRANCHNAME