This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in *.mp4; | |
do name=`echo "$i" | cut -d'.' -f1` | |
echo "$name" | |
ffmpeg -i "$i" -acodec libvorbis -aq 5 -ac 2 -qmax 25 -threads 2 "${name}.webm" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
&:after { | |
content: "< #{map-get($grid-breakpoints, sm)} (xs)"; | |
position: fixed; | |
z-index: 99999; | |
padding: 2px 15px; | |
bottom: 0; | |
left: 0; | |
border-top-right-radius: 5px; | |
background: blue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var width = $(window).width(); | |
$(window).resize(function(){ | |
if($(this).width() != width){ | |
width = $(this).width(); | |
console.log(width); | |
// your code | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ┌───────────── minute (0 - 59) | |
# │ ┌───────────── hour (0 - 23) | |
# │ │ ┌───────────── day of month (1 - 31) | |
# │ │ │ ┌───────────── month (1 - 12) | |
# │ │ │ │ ┌───────────── day of week (0 - 6) (Sunday to Saturday; | |
# │ │ │ │ │ 7 is also Sunday on some systems) | |
# │ │ │ │ │ | |
# │ │ │ │ │ | |
# * * * * * command_to_execute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in *.png ; do convert "$i" "${i%.*}.jpg" ; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Filter TinyMCE Buttons | |
* | |
* Here we are filtering the TinyMCE buttons and adding a button | |
* to it. In this case, we are looking to add a style select | |
* box (button) which is referenced as "styleselect". In this | |
* example we are looking to add the select box to the second | |
* row of the visual editor, as defined by the number 2 in the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# Loop through all items in a list, comma-separate them, but use "and" before the last item | |
e.g. ["apples", "bananas, "carrots] becomes "apples, bananas, and carrots" #} | |
{% macro to_sentence(items) %} | |
{% for item in items %} | |
{# First item #} | |
{% if loop.first %} | |
<span>{{ item }}{% if items|length > 2 %},{% endif %}</span> | |
{% else %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Dump variable": { | |
"prefix": "pr", | |
"body": [ | |
"echo '<pre>';", | |
"print_r($1);", | |
"echo '</pre>';" | |
] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@include media-breakpoint-only(xs)": { | |
"description": "Bootstrap media query for 'xs' only", | |
"prefix": "=xs", | |
"body": [ | |
"@include media-breakpoint-only(xs) {", | |
"\t$1", | |
"}" | |
] | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Dump variable": { | |
"prefix": "dump", | |
"body": [ | |
"<pre>", | |
"\t{{dump($1)}}", | |
"</pre>" | |
] | |
} | |
} |
NewerOlder