Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View sjungling's full-sized avatar

Scott Jungling sjungling

  • Moderne.io
  • Chico, CA
  • 09:44 (UTC -07:00)
View GitHub Profile
@sjungling
sjungling / recent-repos.sh
Created February 16, 2023 00:04
CSV of all organizational repositories and default branch that I have access to that are not archived and have been updated in the last 2 years
#!/usr/bin/env bash
gh api graphql --paginate=true \
-f query='query (
$numOrgs: Int = 100
$numRepos: Int = 100
$endCursor: String
) {
viewer {
organizations(first: $numOrgs) {
@sjungling
sjungling / launch.json
Last active January 25, 2021 17:12
VSCode Server-side Launch
{
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"name": "Attach By Process",
"processId": "${command:PickProcess}",
"request": "attach",
"skipFiles": [
"<node_internals>/**",

Keybase proof

I hereby claim:

  • I am sjungling on github.
  • I am sjungling (https://keybase.io/sjungling) on keybase.
  • I have a public key whose fingerprint is 4869 FACA 1145 A6F1 289C 5640 7855 04CC E3CC 889C

To claim this, I am signing this object:

@sjungling
sjungling / prepare-commit-msg
Created April 6, 2016 04:45
Auto-append branch names to a commit message
#!/bin/sh
#
# Prepend the branch name to the commit message
#
# Add this file as [repo]/.git/hooks/prepare-commit-msg
#
# A couple notes:
# 1. The file must be executable (chmod +x prepare-commit-msg)
# 2. This works on a per-repo basis
var SearchForm = Backbone.View.extend({
template: Handlebars.compile($('#search-template').html()),
options: {
buttonType: 'default',
method: 'GET',
value: null
},
initialize: function(options) {
_.extend(this.options,options);
this.render();
// all work and no play makes Scott a null boy
// all work and no play makes Scott a null boy
// all work and no play makes Scott a null boy
// all work and no play makes Scott a null boy
// all work and no play makes Scott a null boy
// all work and no play makes Scott a null boy
// all work and no play makes Scott a null boy
// all work and no play makes Scott a null boy
// all work and no play makes Scott a null boy
// all work and no play makes Scott a null boy
@sjungling
sjungling / view.js
Created January 7, 2014 21:21
Sample of how to organize Backbone
/**
* Backbone View Organization
*
* 1. View options (events, tagName, el, etc.)
* 2. Initializer
* a. Should call private functions to do setup for listeners, etc.
* 3. Public Methods
* 4. Private Methods
* a. Shall begin with an underscore (_) prefix.
*
@sjungling
sjungling / browse.js
Created November 21, 2013 21:28
helper for normalizing facet unqiue ids
var getFacetUniqueId = function getFacetUniqueId(facet) {
var facetComponents;
if (typeof facet === 'string') {
facetComponents = facet.split('=');
}
if (_.isObject(facet)) {
if (_.has(facet, 'name') && _.has(facet, 'value')) {
facetComponents = [facet.name, facet.value];
casper = require('casper').create()
casper.test.begin "Check for dataLayer on product page", 1, (test) ->
casper.start 'http://local.build.com/k-690/p173354', ->
test.assertEval ->
typeof window.dataLayer.productId != "undefined"
, 'Does dataLayer.productId exist?'
test.assertEvalEquals ->
window.dataLayer.productId
, "K-690", 'Is the value of dataLayer.productId "K-690"?'
<!---
Queues up specific packages that may not follow defined paths of themes/module/page
Example Usage: <cfset application.themeService.loadModule("build.modules.404") />
--->
<cffunction name="loadModule" returntype="void" access="public" output="true">
<cfargument name="module" type="string" />
<cflog text="loadModule called for #module#" />
<cfset var results = StructGet("application.assetMap.#module#") />
<cfif NOT structIsEmpty(results)>
<cfif StructKeyExists(results, "css")>