Skip to content

Instantly share code, notes, and snippets.

View RoLYroLLs's full-sized avatar
🎯
Focusing

RoLY roLLs RoLYroLLs

🎯
Focusing
View GitHub Profile
@RoLYroLLs
RoLYroLLs / .gitconfig
Last active October 10, 2016 23:15
Small list of personal git config
[user]
name = [name]
email = [email]
[core]
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore_global
# windows; if on a windows machine, uncomment line below
#autocrfl = true
@RoLYroLLs
RoLYroLLs / .bash_profile
Last active August 29, 2015 14:00
Git Aware Bash Prompt with some shell shortcuts to Git plumbing
# Git shortcuts
alias gb='git branch'
alias gs='git status'
alias gsu='git status -su'
alias ga='git add'
alias gaa='git add -A'
alias gun='git reset HEAD'
alias gc='git commit'
alias gcm='git commit -m'
alias gco='git checkout'
@RoLYroLLs
RoLYroLLs / toLowerCase.bat
Last active August 29, 2015 14:04
A batch script to lowercase all files and directories within the contained directory
@echo off
setLocal EnableDelayedExpansion
for /F "tokens=*" %%I in ('dir /L /B /s') do (
set f=%%I
set f=!f:%%~dpI=!
ren "%%I" "!f!"
echo "%%I" "!f!"
)
@RoLYroLLs
RoLYroLLs / findUppercase.bat
Created July 28, 2014 20:41
Script to find files and folders which contain any uppercase character.
@echo off
set folder="C:\"
for /f "delims=" %%A in ( ' dir /b %folder% ^| findstr /R "[ABCDEFGHIJKLMNOPQRSTUVWXYZ]" ' ) do (
echo path: %%~dpnxA
echo name: %%~nxA
echo.
)
@RoLYroLLs
RoLYroLLs / .gitignore
Created September 7, 2014 01:02 — forked from adamgit/.gitignore
#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.1
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
@RoLYroLLs
RoLYroLLs / AuditTrailGenerator.sql
Created February 7, 2017 21:08
TSQL Audit Trail Generator with Triggers and Views
-- =============================================
--
-- Modification of https://www.codeproject.com/articles/21068/audit-trail-generator-for-microsoft-sql
--
-- Author: Rolando Liriano
-- Create date: 2017/02/03
-- Description: Creates an audit trail table along with triggers and views for a specified table
-- @TableName required - Name of the table to audit
-- @PrimaryKey required - Name of the primary key in table
-- @TableSchema optional - Current schema of the table
@RoLYroLLs
RoLYroLLs / ClaimsAuthorizationAttribute.cs
Created February 12, 2018 22:53
Custom MVC AuthorizationAttribute for Role Claims
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Caching;
using System.Security.Principal;
using System.Web;
using System.Web.Mvc;
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, Inherited = true, AllowMultiple = true)]
public class ClaimsAuthorizationAttribute : AuthorizeAttribute {
/*
CASE
- Order Selection, required
** Only 1 option can be chosen
- Patient, required
** I am going to make this into a separate class so user does not have to enter same patient info for multiple cases
using System;
using System.Web.Mvc;
using Newtonsoft.Json;
public class JsonNetResult : JsonResult {
public JsonSerializerSettings SerializerSettings { get; set; }
public Formatting Formatting { get; set; }
public JsonNetResult(object data) {
this.JsonRequestBehavior = JsonRequestBehavior.DenyGet;
/*
* bootstrap-session-timeout
* www.orangehilldev.com
*
* Copyright (c) 2014 Vedran Opacic
* Licensed under the MIT license.
*/
(function($) {
/*jshint multistr: true */