Skip to content

Instantly share code, notes, and snippets.

View FiniteLooper's full-sized avatar
👨‍💻

Chris Barr FiniteLooper

👨‍💻
View GitHub Profile
@FiniteLooper
FiniteLooper / pull-request-branch-name.yml
Last active February 21, 2024 16:45
Check Pull Request
name: Pull Request Branch Naming Conventions
on:
pull_request:
jobs:
check-branch-name:
runs-on: ubuntu-latest
steps:
@FiniteLooper
FiniteLooper / tampermonkey-indeed-job-search.js
Last active August 3, 2023 12:21
Job Search keyword & location Highlighting (Indeed, Dice, ZipRecruiter, LinkedIn, Remote.co)
//Moved to: https://github.com/FiniteLooper/UserScripts
@FiniteLooper
FiniteLooper / Add CSS.css
Last active May 2, 2018 18:30
Show a visual representation of how long each TFS build task took
.buildvnext-build-details-header .summary .reason,
.buildvnext-build-details-header .summary .duration{
width: 60%;
}
.buildvnext-build-details-header .summary {
padding-right: 106px;
}
#timeline-bar-chart {
@FiniteLooper
FiniteLooper / angular2-sticky-directive.html
Last active August 8, 2017 12:27
Angular2 Sticky Element Directive
<div class="row">
<div class="col-md-8">
<p>This is some content</p>
</div>
<div class="col-md-4">
@FiniteLooper
FiniteLooper / tslint-ban-config.json
Last active December 26, 2017 02:27
Configuration for TSLint's "ban" rule for modern Angular applications
"ban": [
true,
[ "angular", "each", "Don't rely on angular to perform loops. Either use a 'for of' loop or the native 'array.forEach': https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_each" ],
[ "jQuery", "each", "Don't rely on jQuery to perform loops. Either use a 'for of' loop or the native 'array.forEach': https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_each" ],
[ "$", "each", "Don't rely on jQuery to perform loops. Either use a 'for of' loop or the native 'array.forEach': https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_each" ],
[ "_", "each", "Don't rely on Underscore to perform loops. Either use a 'for of' loop or the native 'array.forEach': https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_each" ],
[ "_", "forEach", "Don't rely on Underscore to perform loops. Either use a 'for of' loop or the native 'array.forEach': https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_
@FiniteLooper
FiniteLooper / Add Css.css
Last active May 29, 2018 20:12
Allows auto-filling of GreenShades timesheet comments & easy filling with pre-made comments
#js-other-comments{
padding: 5px;
border-top: 1px solid #C0C0C0;
}
#js-other-comments a{
padding: 5px 7px;
}
@FiniteLooper
FiniteLooper / Add Html.htm
Last active December 19, 2017 19:14
GreenShades - Display PTO as Days!
<script>
$(() => {
//run initially
appendDays();
//run again on any page update
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(appendDays);
});
function appendDays() {
@FiniteLooper
FiniteLooper / inline-svg-swap.js
Created August 28, 2014 16:07
A simple way to swap out .svg files linked by images with the actual <svg> source so you can control colors, etc. with CSS.
$(function(){
$("img[src$='.svg']").each(function(i,el) {
$.get(el.src, function(data) {
var svg = $(data).find('svg');
if (svg) {
$(el).replaceWith(svg);
}
});
});
@FiniteLooper
FiniteLooper / BundleHelpers.cs
Created April 18, 2013 03:52
Easy Bundles for .NET MVC4 - Blog post with explanation here: http://chris-barr.com/2013/04/easy-bundles-for-net-mvc4/
using System.Linq;
using System.Web.Optimization;
namespace System.Web.Mvc
{
public static class HtmlHelperExtensions
{
public static IHtmlString Script(this HtmlHelper helper, params string[] urls)
{
@FiniteLooper
FiniteLooper / 1-header.php
Last active December 15, 2015 05:39
Wordpress Menu Navigation
<nav class="container_12">
<?php
//Counter
$i=0;
//An array that will eventually contain the correct top-level navigation items in it
$menu_arr = array();
//Loop though all the nav items in Wordpress
foreach ( wp_get_nav_menu_items('Nav') as $key => $item ) {