Skip to content

Instantly share code, notes, and snippets.

View erikzrekz's full-sized avatar
🤹
Working

Eriks Reks erikzrekz

🤹
Working
View GitHub Profile
@erikzrekz
erikzrekz / assetPipeline.js
Last active August 29, 2015 14:12
Asset Pipeline for Express
'use strict';
var _ = require('underscore');
var path = require('path');
var rack = require('smaller-asset-rack');
var MANIFEST = path.join(config.root, 'public', 'assets.json');
var STYLESHEETS = [
'application.css.less'
#source
http://code-worrier.com/blog/autocomplete-git/
#download
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
#add to .bash_profile
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
@erikzrekz
erikzrekz / zendesk-hc-template-and-components-doc.md
Last active April 26, 2022 17:08
Zendesk Help Center Template and Components Documenation

The help center has a series of HTML templates with accompanying components. I put this together to brief myself on the available features within a help center. The official documentation can be found here

Table of Contents

  • Header
  • Footer
  • Home
  • Category
  • Section
  • Article
  • Contribution
///////////////////////////////////////////////////
// Source: http://marcel.turi.co/up/favicon.html //
///////////////////////////////////////////////////
var favIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABrUlEQVR42mNkwAOepOgxMTD9mwhk...";
var docHead = document.getElementsByTagName('head')[0];
var newLink = document.createElement('link');
newLink.rel = 'shortcut icon';
newLink.href = favIcon;
app.factory('PollingService', function($http, $timeout) {
var data = { response: {} };
var poller = function() {
$http.get('data.json').then(function(r) {
data.response = r.data;
$timeout(poller, 1000);
});
};
poller();
@erikzrekz
erikzrekz / iphone6plus_silver.html
Created November 17, 2016 22:49
marvel-device iphone6plus snippet
<div class="marvel-device iphone6plus silver">
<div class="top-bar"></div>
<div class="sleep"></div>
<div class="volume"></div>
<div class="camera"></div>
<div class="sensor"></div>
<div class="speaker"></div>
<div class="screen">
<!-- <img src=""> goes here -->
</div>
@erikzrekz
erikzrekz / col-3-iphone6plus_silver.html
Created November 17, 2016 23:12
marvel-device iphone6plus side-by-side snippet
<p class="col-lg-3 col-md-3 col-sm-3">
<div class="marvel-device iphone6plus silver">
<div class="top-bar"> </div>
<div class="sleep"> </div>
<div class="volume"> </div>
<div class="camera"> </div>
<div class="sensor"> </div>
<div class="speaker"> </div>
<div class="screen">
<!-- <img src=""> goes here -->
@erikzrekz
erikzrekz / col-4-pull-right-img
Created November 17, 2016 23:32
Pulled Right Image Example
<img class="col-md-4 pull-right" src="http://emojipedia-us.s3.amazonaws.com/cache/41/af/41aff1557db7c43d38d4d9f33f59be5f.png" />
@erikzrekz
erikzrekz / googleSearchUrl.js
Created May 30, 2017 03:40 — forked from dannyid/googleSearchUrl.js
What do these parameters even mean?
const language = `en`,
numResults = `100`, // 1 to 100
personalization = `0`, // Non-personalized
encoding = `UTF-8`,
verbatim = `li:1`, // No auto-correct and no location
ssl = `ssl`;
const googleSearchUrl = `https://www.google.com/search` +
`?q=${keyword}` +
`&hl=${language}` +
@erikzrekz
erikzrekz / hotpo.js
Last active June 5, 2017 01:28
An algorithm that gives you the number of steps it takes n to be 1 — the 3x+1 problem.
var x = 0;
var n = 1988;
do {
if (n % 2 == 0) {
n = n / 2;
} else {
n = (3 * n) + 1;
}