Skip to content

Instantly share code, notes, and snippets.

View ghanbak's full-sized avatar
🍑
butts

Ethan MacDonald ghanbak

🍑
butts
View GitHub Profile
@ghanbak
ghanbak / Countdown-Timer.js
Last active December 10, 2018 20:51
After Effects Code, Tips, and Tricks
rateOfSpeed=1;
clockStartTime=thisComp.layer("Timer Duration").effect("Slider Control")("Slider")*60;
clockTimeNumber=Math.floor(clockStartTime - rateOfSpeed*time);
minutes=Math.floor(clockTimeNumber/60);
seconds=clockTimeNumber%60;
minutes+":"+seconds;
@ghanbak
ghanbak / review.md
Last active July 11, 2018 02:58
Facebook Messenger Review

Why is this product well designed?

Facebook Messenger is well designed because it uses strong typography, clear hierarchy, and simple workflows that give users the ability to communicate with friends and family.

What job or problem is this product solving for people who use it?

Messenger gives users the ability to do 3 awesome things.

  1. Keep in touch with friends and family.
  2. Interact with businesses.
  3. Quick access to support.
# Directives to send expires headers and turn off 404 error logging for Static assets
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpe?g|gif|png|ico|zip|pdf|t?gz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|swf|bmp|txt|rtf|md)$ {
access_log off;
log_not_found off;
expires max;
add_header Cache-Control public;
}
@ghanbak
ghanbak / gettin-sassy.md
Last active August 29, 2015 14:01
Some sweet SASSiness I've learned.

sass #SASS

Tips N Tricks with Ian Carrico

http://iamcarrico.github.io/tips-tricks-with-sass/#/

##Changing Color Template

I specifically created this snippet for a school site I was working on to change the colors based on what school pages, within a single Drupal site install, a user was on; the actual code was much longer but reduced a 7000 line CSS file down to 1200 lines of SASS. The school is http://isd191.org and I developed this while working for http://augustash.com. It uses a basic @each statement to select the page template's class then uses if/else logic to change colours based on the school class. Each school had variables associated with each element that had a specific color change.

html5/css3 #HTML5 AND CSS3

HTML5 Shiv

Put this in your <head> to make HTML5 work with frickin IE8.

<!--[if lt IE 9]>
    <script src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ghanbak
ghanbak / drupal.md
Last active May 24, 2017 16:25
A gist for all things I need to know about Drupal.

drupal logo

ALL THINGS DRUPAL

Core Update

run this on / of the project

drush pm-update

javascript

JAVASCRIPT

Dynamic Widths

var P = $('.container div').length;

var W = 100/P+'%';

Pantheon Development

Git Mode

Follow this flow of using Pantheon in git mode:

git status
git add . //or git add <file>
git commit
@ghanbak
ghanbak / magento.md
Last active May 24, 2017 16:28
This gist is dedicated to handling all things related within the programming of Magento.

All Things Magento

Categories

GET ID

<?php  if($_product->getCategoryId() != 4) : ?>
@ghanbak
ghanbak / command-line.md
Last active May 24, 2017 16:27
Command Line snippets and Git commands