Skip to content

Instantly share code, notes, and snippets.

@arieljatib
arieljatib / gist:07cbe12d96305ff4b519
Last active August 26, 2015 20:54 — forked from jvenator/gist:9672772a631c117da151
PDFtk Server Install Workaround for Mac OS X

Installing PDFtk Server edittion on your Mac

This workaround install is necessary because PDFtk was pulled from homebrew-cask due to issues with it aggressively overwriting file permissions that could impact other installed libraries. See this homebrew-cask issue.
The following steps worked on Mac OS X 10.10.1 with a standard brew installation for the PDFtk Mac OS X server libary version 2.02.
All Terminal commands separated by a full line space. Some commands wrap into multiple lines.

Download and extract the Mac OS X server install pacakge

@arieljatib
arieljatib / list-w-cool-heading.md
Last active August 26, 2015 21:47
Comment List w Horizontal Rule-like Heading

Comment List w Horizontal Rule-like Heading

The Markup

<div class="comment-label">Comments</div>
<ul class="comment-list">
  <li>Cool comment</li>
</ul>
@arieljatib
arieljatib / gae-deploy.md
Last active August 29, 2015 14:09
Deploying Python App to Google App Engine

Deploying Django App to Google App Engine

TL;DR

Syntax for deploying app

  • set project_ID.
  • the my-project-folder/ should contain app.yaml

appcfg.py -A project_ID update my-project-folder/

NOTE:

@arieljatib
arieljatib / gke-kubernetes.md
Last active August 29, 2015 14:09
Container Engine, Google Cloud

Container Engine, Google Cloud

These are some random notes captured while attempting the tutorial Getting Started

Outstanding Questions

  • How do I access the Redis database? What if I need to query it directly? If it was on a VM, it wouldn't be a problem. Where does that data live?

Setup

  1. The Before You Begin document includes a button to "Enable the Container Engine API".
  2. From there, you're prompted to select the Project on which to enable the APIs
@arieljatib
arieljatib / 2-color-button.scss
Created December 9, 2014 18:30
Customizing Bootstrap : Gradient Button w 2 Solid Color Button Hover State
// let's start with the default buttons.
.btn, .btn-default {
@include single-transition(all, 200ms, ease-out); // adding an animation to the transition
background-color: $my-color; // optionally set a colors ... using a variables of course.
color: $text-color;
@include background-image(linear-gradient(top, lighten($my-color, 40%), $my-color)); // let's use a gradient on the default state
&:hover, &:active {
background-color: lighten($my-color, 5%);
// use a gradient and transparency to create the appearance of two solid colors
@include background-image(linear-gradient(0deg, rgba($my-color,0) 0%, rgba($my-color,0) 50%, rgba($my-color,0.7) 65%));
@arieljatib
arieljatib / bs3-django.html
Created December 18, 2014 05:35
Bootstrap 3 w Django's Endless Pagination
<nav>
<ul class="pagination">
{% get_pages %}
{% for page in pages %}
<li><a href="{{ page.url }}">{{ page.number }}</a></li>
{% endfor %}
</ul>
</nav>
@arieljatib
arieljatib / bs3-safari-sidebarbug.md
Created March 10, 2015 17:28
Bootstrap 3, Safari - large resolution issue on left sidebar with affix + scrollspy
@arieljatib
arieljatib / goto-rails.md
Last active August 29, 2015 14:18
Go To Rails

Images SRC

  • image-url("rails.png") becomes url(/assets/rails.png)
  • image-path("rails.png") becomes "/assets/rails.png"
  • asset-url("rails.png") becomes url(/assets/rails.png)
  • asset-path("rails.png") becomes "/assets/rails.png"

source

Styling

Method : button_to

@arieljatib
arieljatib / animate-bookmark-link.js
Last active September 17, 2015 15:44
Animate Bookmark Links w jQuery
@arieljatib
arieljatib / fromBottom.js
Last active October 10, 2015 13:24
Set Distance From Bottom, Stop Fixed Position
// Adjust location of 'back to top' near the bottom of the page
function notTooNearTheBottom() {
var viewportHeight = $(window).height();
var actionsArea = $(window).scrollTop() + viewportHeight;
var bottomBoundary = $(document).height() - 90; // this is our 'safe area'
if( actionsArea > bottomBoundary ) {
// console.log('near the bottom - move 'up to top', hide 'comments');
$('#action-top').css('top', bottomBoundary);
}