Skip to content

Instantly share code, notes, and snippets.

View tayvano's full-sized avatar

Taylor Monahan tayvano

View GitHub Profile
@tayvano
tayvano / Equal-Heights-JS.js
Created January 24, 2016 23:24
Equal Heights JS
//Gives Containers equal heights, using the tallest height and applying it to the other containers
//the function takes two arguments, the class of the container of all to-be-equalized containers, and the class of the containers themselves
function equalizeContainers(containerClass, targetClass) {
//Get all containers of to-be-equalized elements...
var containerElements = document.getElementsByClassName(containerClass);
//... and iterate through them
for(var i = 0; i < containerElements.length; i++) {
# Google's Language Map
ach : Acoli
af : Afrikaans
ak : Akan
am : አማርኛ
ar : العربية
az : azərbaycan
ban : Balinese
be : беларуская
bem : Ichibemba
@tayvano
tayvano / wp-query-ref.php
Last active April 21, 2017 07:15 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@tayvano
tayvano / encoding-video.md
Created December 31, 2016 05:27 — forked from Vestride/encoding-video.md
Encoding Video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aacc --with-opus
// Smooth Scolling https://css-tricks.com/snippets/jquery/smooth-scrolling/
// the higher the "400" number is, the slower is goes.
$(function() {
$('a[href*=\\#]:not([href=\\#])').click(function(e) {
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') || location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top - 110
function limit_char($limit, $source=null) {
global $post;
($source) ? '<p>'.$source.'</p>' : $source = '<p>'.get_the_excerpt().'</p>';
$read_more = '... <a href="'. get_permalink($post->ID) . '" class="more-link" title="Read '.get_the_title($post->ID).'">Read more</a>';
$limited = strlen($source) > $limit ? substr($source,0,strpos($source,' ',$limit)) . $read_more : $source;
echo $limited;
}
@tayvano
tayvano / walletdecryptdrtv.js in html
Created February 3, 2017 05:14
walletdecryptdrtv.js in html
<article class="row" ng-controller='decryptWalletCtrl'>
<!-- Column 1 - Select Type of Key -->
<section class="col-md-4 col-sm-6">
<h4 translate="decrypt_Title"> Select the format of your private key: </h4>
<div class="radio"><label><input type="radio" ng-model="walletType" value="fileupload" /><span translate="x_Keystore2">Keystore / JSON File</span></label></div>
<div class="radio"><label><input type="radio" ng-model="walletType" value="pasteprivkey" /><span translate="x_PrivKey2">Private Key</span></label></div>
<div class="radio"><label><input type="radio" ng-model="walletType" value="pastemnemonic" /><span translate="x_Mnemonic">Mnemonic Phrase</span></label></div>
<div class="radio" ng-hide="globalService.currentTab==globalService.tabs.signMsg.id"><label><input type="radio" ng-model="walletType" value="ledger" />Ledger Nano S</label></div>
<div class="radio" ng-hide="globalService.currentTab==globalService.tabs.signMsg.id"><label><input type="radio" ng-model="walletType" valu
# -----------------------------
# 2. MAKE TERMINAL BETTER
# -----------------------------
alias cp='cp -iv' # Preferred 'cp' implementation
alias mv='mv -iv' # Preferred 'mv' implementation
alias mkdir='mkdir -pv' # Preferred 'mkdir' implementation
alias ll='ls -FGlAhp' # Preferred 'ls' implementation
alias less='less -FSRXc' # Preferred 'less' implementation
@tayvano
tayvano / gist:6e2d456a9897f55025e25035478a3a50
Created February 19, 2017 05:29
complete list of ffmpeg flags / commands
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full.
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…
Getting help:
-h — print basic options
-h long — print more options
-h full — print all options (including all format and codec specific options, very long)

Keybase proof

I hereby claim:

  • I am tayvano on github.
  • I am tayvano (https://keybase.io/tayvano) on keybase.
  • I have a public key ASBa64mpsHMVdrXgqF_bPTqz7pZxKiudr_d_f-sVvfwDqQo

To claim this, I am signing this object: