Skip to content

Instantly share code, notes, and snippets.

View jturmel's full-sized avatar

Josh Turmel jturmel

View GitHub Profile
@Geoplous
Geoplous / divi-blog-module-tags.txt
Last active January 9, 2024 09:09
WordPress Divi show tags in Blog module
/* Create an override in your child theme.
/* Copy of the: Divi/includes/builder/module/Blog.php
/* to (create /module/ folder if does not exist): Divi-child/module/Blog.php
/* Edit the new Blog.php,
/* line3, replace: ET_Builder_Module_Blog with: Geoplous_ET_Builder_Module_Blog
/* last line, repace: new ET_Builder_Module_Blog; with new Geoplous_ET_Builder_Module_Blog;
/* Just before </article> (it will show the tags on the bottom of the post) add the code below:
<?php
@jez500
jez500 / package.json
Created December 26, 2018 11:32
Simple Webpack 4 Compile SCSS to CSS config with autoprefix and minify
{
"name": "my-project",
"version": "1.0.0",
"description": "Simple SCSS complie with autoprefix and minify",
"scripts": {
"build": "webpack"
},
"devDependencies": {
"autoprefixer": "^9.0.0",
"breakpoint-sass": "^2.7.1",
@crucialfelix
crucialfelix / graphql_auth.py
Created August 4, 2017 19:03
django-graphene auth decorator
from decorator import decorator
def _check_auth(args, pred):
_, _, context, _ = args
if not pred(context):
raise Exception("Unauthorized")
@decorator
def is_user(fn, *args, **kwargs):
@vespertilian
vespertilian / conditional_effects.ts
Created February 9, 2017 04:09
Two options for conditional ngrx effects
@Effect()
selectAndLoadStore$: Observable<Action> = this.actions$
.ofType(storeActions.SELECT_AND_LOAD_STORE)
.withLatestFrom(this.store.select(ngrx.storeState))
.map(([action, storeState]) => [action.payload, storeState])
.switchMap(([storeName, storeState]) => {
const existsInStore = Boolean(storeState.urlNameMap[storeName]);
return Observable.if(
() => existsInStore,
Observable.of(new storeActions.SetSelectedStore(storeName)),
@dlaroe
dlaroe / CRS-4x12-ortholinear-layout.kbd.json
Last active July 11, 2025 03:32
CRS 4x12 ortholinear layout
[
{
"name": "CRS 4x12 ortholinear layout",
"author": "DRL https://github.com/qmk/qmk_firmware/tree/master/layouts/community/ortho_4x12/crs/",
"plate": false
},
[
{
"c": "#e8b0b0",
"a": 7
@calebd
calebd / ArrayHelpers.swift
Last active January 29, 2025 06:05
Swift Helpers
extension Array {
func first() -> Element? {
if isEmpty {
return nil
}
return self[0]
}
func last() -> Element? {
@technige
technige / zen_of_cypher.md
Last active April 1, 2020 09:57
The Zen of Cypher

The Zen of Cypher

  • Write functions() in lower case, KEYWORDS in upper.
  • START each keyword clause
    ON a new line.
  • Use either camelCase or snake_case for node identifiers but be consistent.
  • Relationship type names should use UPPER_CASE_AND_UNDERSCORES.
  • Label names should use CamelCaseWithInitialCaps.
  • MATCH (clauses)-->(should)-->(always)-->(use)-->(parentheses)-->(around)-->(nodes)
  • Backticks `cân éscape odd-ch@racter$ & keyw0rd$` but should be a code smell.
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active September 25, 2025 20:45
A badass list of frontend development resources I collected over time.
@mislav
mislav / _readme.md
Last active July 22, 2025 23:54
tmux-vim integration to transparently switch between tmux panes and vim split windows

I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).

In Vim I have key bindings C-h/j/k/l set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W.) I'd like to use the same keystrokes for switching tmux panes.

An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\.

Here's how it should work:

@johnbender
johnbender / prefs.js
Created February 23, 2013 06:20
Set up Chrome Secure Shell to handle solarized terminal colors
// Disable bold.
term_.prefs_.set('enable-bold', false)
// Use this for Solarized Dark
term_.prefs_.set('background-color', "#002b36");
term_.prefs_.set('foreground-color', "#839496");
term_.prefs_.set('color-palette-overrides', [
'#073642',
'#dc322f',