Skip to content

Instantly share code, notes, and snippets.

View wayferer's full-sized avatar
🧙‍♂️
Working from home

Abdullah Norozi Iranzad wayferer

🧙‍♂️
Working from home
View GitHub Profile
# Push a subfolder to heroku
git subtree push --prefix SUBFOLDERNAME REMOTENAME master
# Push a non-master branch subfolder to heroku
git push REMOTENAME `git subtree split --prefix SUBFOLDER NONMASTERBRANCH`:master --force
$col_1: #d50000;
$col_2: #C51162;
$col_3: #AA00FF;
$col_4: #6200EA;
$col_5: #304FFE;
$col_6: #2962FF;
$col_7: #0091EA;
$col_8: #00B8D4;
$col_9: #00BFA5;
$col_10: #00C853;

Keybase proof

I hereby claim:

  • I am wayferer on github.
  • I am wayferer (https://keybase.io/wayferer) on keybase.
  • I have a public key whose fingerprint is BCFC 6315 8412 AB3C D69D A11C B2F7 85B9 8579 65DD

To claim this, I am signing this object:

/* Pre-Define HTML5 Elements in IE */
(function(){ var els = "source|address|article|aside|audio|canvas|command|datalist|details|dialog|figure|figcaption|footer|header|hgroup|keygen|main|mark|meter|menu|nav|picture|progress|ruby|section|time|video".split('|'); for(var i = 0; i < els.length; i++) { document.createElement(els[i]); } } )();
@wayferer
wayferer / js.js
Created February 28, 2014 17:40
phonegap file path
function getPhoneGapPath() {
var path = window.location.pathname;
path = path.substr( path, path.length - 10 );
return 'file://' + path;
}
var snd = new Media( getPhoneGapPath() + 'test.wav' );
@wayferer
wayferer / css.css
Created February 19, 2014 16:41
fluid iframe (used for youtube vids)
.fluidVidContainer{width:100%;position:relative;margin-bottom:20px}
.fluidVidContainer:before{
display:block;content:'';
padding-top:56.25%;/*16x9*/
padding-top:75%;/*4x3*/
padding-top:200%;/*1x2*/
padding-top:50%;/*2x1*/
padding-top:100%;/*1x1*/
}
.fluidVidContainer iframe{position:absolute;top:0;left:0;width:100%;height:100%}
@wayferer
wayferer / js.js
Created February 12, 2014 20:11
modal (incomplete)
//requires helpers.js
function showDialog(dialogToShow,event){
event.preventDefault ? event.preventDefault():event.returnValue=false;
zAddClass(zQ('body'),'overflowHidden');
zAddClass(zQ('.backdrop'),'displayBlock');
zAddClass(zQ('.dialog'),'displayBlock');
}
function hideDialog(event){
event.preventDefault ? event.preventDefault():event.returnValue=false;
zRemoveClass(zQ('body'),'overflowHidden');
@wayferer
wayferer / css.sass
Created February 12, 2014 17:50
sticky nav
.productSubNavContainer{
height:44px;
box-shadow:inset 0 1px 0 0 rgba(0,0,0,0.1);
background-color:#D6D9DC;
}
.productSubNav{
&.fixed{
@include z-position(fixed,0px,0px,0,0px);
box-shadow:inset 0 1px 0 0 rgba(0,0,0,0.1);
background-color:#D6D9DC;
@wayferer
wayferer / js.js
Last active May 27, 2019 19:19
JS scroll to anchor
//requires helpers.js
function zScrollToAnimate(el,from,to,time){
var start=new Date().getTime();
var timer=setInterval(function(){
var step=Math.min(1,(new Date().getTime()-start)/time);
el.scrollTop=from+step*(to-from);
//el.scrollTo(0,from+step*(to-from));
if(step==1){clearInterval(timer);}
},25);
}
@wayferer
wayferer / anotherway.html
Last active September 11, 2015 21:47
youtube video load with custom image (with youtube image fallback) and custom playbutton with fallback for touch devices. Needs to be optimized / done better. relies on my helper.js
<div class="fluidVidContainer">
<div class="fluidVidContainer-overlay">
<img src="<%= asset_path('video-overlay-theroadtolife.png') %>" alt="" class="video-thumb">
<button class="btn_play js-youtubePlay" data-ytID="ScMzIvxBSi4">
<span class="icon icon-play"><i class="fa fa-play"></i></span>
<span class="video-title">The Road to Life?<span class="video-duration">3 min 7 sec</span></span>
</button>
</div>
</div>