Skip to content

Instantly share code, notes, and snippets.

View ThatGuyCND's full-sized avatar
🥵
to exist, one must work. to work, one must have purpose. existence is pain.

Erik Baldwin ThatGuyCND

🥵
to exist, one must work. to work, one must have purpose. existence is pain.
View GitHub Profile
alias.df !git diff --no-prefix && git diff --staged --no-prefix
alias.clear reset --hard
alias.st status
alias.lg log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
alias.co checkout
alias.con checkout -b
alias.ci commit
alias.br branch
alias.ls branch -a
@bclinkinbeard
bclinkinbeard / release.sh
Created November 1, 2011 20:22
Bash script to automate the Git Flow tag/release process
#!/bin/bash
# current Git branch
branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
# v1.0.0, v1.5.2, etc.
versionLabel=v$1
# establish branch and tag name variables
devBranch=develop
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@mparker17
mparker17 / Whose Hook is it Anyway.md
Last active December 19, 2015 17:19
2013-07-13 DrupalCampTO Presentation - Whose Hook is it Anyway?

Whose Hook is it Anyway?

A comedic look into Drupal 8

Presented at DrupalCamp Toronto 2013 (2013-07-13). By @mparker17 and @emarchak

Dependency injection in D8

What is dependency injection?

@mpezzi
mpezzi / variable-check.php
Created September 6, 2013 18:40
Find corrupt values in variable table
<?php
$result = db_select('variable', 'v')
->fields('v', array('name', 'value'))
->orderBy('name', 'ASC')
->execute()
->fetchAll();
$rows = array();
foreach ($result as $row) {
@star-szr
star-szr / mytheme.theme.php
Created March 28, 2014 19:33
Adding template suggestions for view modes and content types in Drupal 8
<?php
/**
* Implements hook_theme_suggestions_HOOK_alter() for node.html.twig.
*/
function MYTHEME_theme_suggestions_node_alter(array &$suggestions, array $variables) {
// Add template suggestions based on the current view mode.
$node = $variables['elements']['#node'];
$suggestions[] = 'node__' . $variables['elements']['#view_mode'];
$suggestions[] = 'node__' . $node->bundle() . '__' . $variables['elements']['#view_mode'];
}
@ForestMars
ForestMars / twigview.xml
Last active August 29, 2015 13:57
Add Twig templates to Quickview
## How to add Twig templates to your OSX Quickview
## Due to the way OSX works you have to add new declarations for a file type to an application.
## That's bc of OSX's app-based approach (as opposed to the standard file based approach in Unix!)
## So you need to pick an application to add this definition to.
## I recommend using a free app you downloaded and not something you have licensed/registered.
# Find the Application in Finder, control-click it, and select "Show package contents"
@johno
johno / gulpfile.js
Created December 17, 2014 07:39
Use the a11y npm package in a gulpfile.
var gulp = require('gulp');
var gutil = require('gulp-util');
var a11y = require('a11y');
gulp.task('a11y', function() {
a11y('http://furtive.co', function(err, reports) {
if (err) {
gutil.log(gutil.colors.red('gulp a11y error: ' + err));
return;
}

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@tristanisfeld
tristanisfeld / browsersync.js
Last active November 10, 2023 23:58
Gulp 4 - Multifile tasks w/ external config. Basic gulpfile template for use with multiple task files, using gulp-load-plugins
// =========================================================
// Gulp Task: browsersync
// NOTE: Using gulp v4
// Description: Sync sass, typescript, html, and browser
// using external config or add modify src
// npm install --save-dev browser-sync gulp-typescript gulpjs/gulp.git#4.0 gulp-load-plugins
// Options: node-sass gulp-sass || gulp-ruby-sass
// =========================================================
var config = require('../config.js');
var browserSync = require('browser-sync').create();