Skip to content

Instantly share code, notes, and snippets.

🏠
Streaming @ twitch.tv/Ryannosaurusrex

Ryan Hayes RyannosaurusRex

🏠
Streaming @ twitch.tv/Ryannosaurusrex
Block or report user

Report or block RyannosaurusRex

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
@RyannosaurusRex
RyannosaurusRex / RockRmsExportToPCO.sql
Last active Sep 21, 2018
An Export script for use when migrating from RockRMS to Planning Center Online's CSV import format. Use this with SQL Operations Studio to export the results directly to .csv.
View RockRmsExportToPCO.sql
SELECT TOP (1000)
p.[Id] as PersonId
,COALESCE( [FirstName] , '' ) as FirstName
,COALESCE([NickName], '') AS NickName
,COALESCE([MiddleName], '') AS MiddleName
,COALESCE([LastName], '') AS LastName
,[BirthDate] as Birthdate
,[AnniversaryDate] as Anniversary
--,MedicalNotes
,g.id as HouseholdID
View keybase.md

Keybase proof

I hereby claim:

  • I am ryannosaurusrex on github.
  • I am ryannosaurusrex (https://keybase.io/ryannosaurusrex) on keybase.
  • I have a public key ASCmgpW0YP-qQLDMTUAGT9QQpd7SwrY_2EwpJyCpFz44ewo

To claim this, I am signing this object:

@RyannosaurusRex
RyannosaurusRex / webnotification.js
Created Jan 10, 2017
Example of how to send a notification using the Web Notification API
View webnotification.js
function showNotification(title, body) {
var notification = new Notification(title, { body });
notification.onclick = e => {
alert("Clicked!");
};
}
Notification.requestPermission(permission => {
console.log(permission);
if(permission==="granted") {
View ryan.boxstarter
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Enable-RemoteDesktop
cinst fiddler4
cisnt nodejs.install
cinst git-credential-winstore
cinst console-devel
cinst filezilla
cinst poshgit
cinst skype
@RyannosaurusRex
RyannosaurusRex / build.cake
Last active Mar 15, 2017
Cake build watcher task. It includes a Windows 10 toast notification when the build completes.
View build.cake
#addin "nuget:?package=Cake.Watch" // Put this at the top to pull in the Cake.Watch package for use.
// Add this task in your build file somewhere. You can update which target to run, the file pattern to watch, and even the toast notification.
Task("Watch")
.Does(() => {
var settings = new WatchSettings {
Recursive = true,
Path = "./",
Pattern = "*.*"
};
@RyannosaurusRex
RyannosaurusRex / email.csx
Created Nov 6, 2015
Send an email using ScriptCS
View email.csx
// This script sends an email using ScriptCS.
// Useful as an isolated, easy to configure email sender to debug SMTP
// issues that may be hard/impossible by running your production application
// over and over just to send an email.
// More Info: http://scriptcs.net/
using System.Net.Mail;
string from = "from@address.com";
string to = "to@address.com";
@RyannosaurusRex
RyannosaurusRex / package.bat
Created Oct 14, 2015
Recursively package all .nuspec files in a directory from a .bat file.
View package.bat
@ECHO OFF
SETLOCAL
SET VERSION=%1
SET NUGET=.\BuildAndPackageSupport\nuget.exe
FOR /r %%f IN (*.nuspec) DO (
echo "packing..."
%NUGET% pack %%f -Version %VERSION%
)
@RyannosaurusRex
RyannosaurusRex / mark-required.js
Created Apr 29, 2015
Mark Fields as Required
View mark-required.js
// Checks an element to see if the validation says it is required
// and if so, adds a '*' to the label using the 'for' semantic attribute.
function MarkAsRequired(element) {
var req = $(element).attr('data-val-required');
if (undefined != req) {
var label = $('label[for="' + $(element).attr('id') + '"]');
var text = label.text();
if (text.length > 0) {
label.append('<span style="color:red"> *</span>');
}
@RyannosaurusRex
RyannosaurusRex / Ember in ASP.NET MVC.md
Last active May 2, 2019
Adding an EmberJS app to an ASP.NET MVC app
View Ember in ASP.NET MVC.md

How to set up an Ember app inside of an ASP.NET MVC app.

I love Ember. It helps me build fantastic UIs, but security isn't super straightforward and I suck at it. I love ASP.NET MVC. It help me build secure applications and solid APIs, but for some apps I need a great responsive UI with great interaction.

Together, these two technologies can be used together to create really amazing apps (and really quickly, too). So this guide is to show you how to set them up together.

Note: This article assumes you have created a stock new ASP.NET project within Visual Studio and included MVC and WebAPI options. It also assumes you have EMBER CLI installed and have run ember new my-ember-app into a directory in the root of your ASP.NET MVC project.

@RyannosaurusRex
RyannosaurusRex / Javascript Notify
Created Jan 15, 2014
Notify a user who has minimized a window when a message or event has arrived. The blur/focus is to ensure that the javascript message is not fired when a user is on the screen, to minimize annoyances of closing the popup window.
View Javascript Notify
var inFocus = true;
$(window).blur(function(){
inFocus = false;
});
$(window).focus(function(){
inFocus = true;
});
setTimeout(function(){
if (!inFocus) {
You can’t perform that action at this time.