Skip to content

Instantly share code, notes, and snippets.

View jordanrobinson's full-sized avatar
:shipit:
Shippin' it

Jordan Robinson jordanrobinson

:shipit:
Shippin' it
View GitHub Profile
@kevinbrechbuehl
kevinbrechbuehl / ContentSearchTest.cs
Created July 22, 2015 11:23
Sitecore Content Search Unit Test
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using Moq;
using NUnit.Framework;
using Sitecore.ContentSearch;
using Sitecore.ContentSearch.Linq;
using Sitecore.ContentSearch.SearchTypes;
@komainu85
komainu85 / Sitecore Image Url Computed Field
Created February 18, 2015 08:32
Sitecore Image Url Computed Field
public class ImageUrl : IComputedIndexField
{
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable)
{
Item item = indexable as SitecoreIndexableItem;
if (item != null)
{
var fileField = ((FileField)item.Fields["Image"];
@joemaller
joemaller / Readme.md
Last active February 10, 2019 23:21
A simple gulpfile example

Build-tools and Live Reload

As creating for the web has gotten more complex, build tools have become an essential part of my workflow. These tools are usually used to automate repetitive tasks such as pre-processing CSS stylesheets from Sass or Less, or compiling JavaScript from many smaller files. They can also reload browsers when files change -- not having to constantly mash reload is a significant productivity boost. Working without auto-refresh now feels like trying to type in mittens.

[Gulp][] and [Grunt][] run from the Terminal, [CodeKit][] and [LiveReload][] are standalone Mac apps. Gulp is relatively new, is very fast and its task definition files are written in JavaScript. Grunt is more established, works well and has a ton of people using it, but can be slower and requires a lot more configuration using verbose JSON files. CodeKit and LiveReload help with common workflows, Gulp and Grunt can do just about anything imaginable.

I’d been happily using Grunt for a while, but increasing buzz a

@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active May 3, 2024 12:32
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@qguv
qguv / solarized-dark.css
Last active April 5, 2021 04:50 — forked from nicolashery/solarized-dark.css
Solarized theme for Jekyll, updated to reflect toned-down line numbers
/* Solarized Dark
For use with Jekyll and Pygments
http://ethanschoonover.com/solarized
SOLARIZED HEX ROLE
--------- -------- ------------------------------------------
base03 #002b36 background
base01 #586e75 comments / secondary content
@granoeste
granoeste / EachDirectoryPath.md
Last active April 4, 2024 22:32
[Android] How to get the each directory path.

System directories

Method Result
Environment.getDataDirectory() /data
Environment.getDownloadCacheDirectory() /cache
Environment.getRootDirectory() /system

External storage directories

@cobyism
cobyism / gh-pages-deploy.md
Last active May 7, 2024 18:46
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@featheredtoast
featheredtoast / diffmerge-diff.sh
Created May 3, 2012 20:17 — forked from ecerulm/diffmerge-diff.sh
Cygwin Git: wrappers for diffmerge, winmerge, and p4merge
#!/bin/sh
# Use SourceGear DiffMerge as mergetool for git in cygwin.
# git config --global mergetool.diffmerge.cmd "diffmergetool.sh \"\$LOCAL\" \"\$REMOTE\" \"\$BASE\" \"\$MERGED\""
# git config --global mergetool.diffmerge.trustExitCode false
# git difftool -t diffmerge branch1..branch2
# Reference: http://www.tldp.org/LDP/abs/abs-guide.pdf
library=githelperfunctions.sh