Skip to content

Instantly share code, notes, and snippets.

// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class
@amdest
amdest / useful-ffmpeg-commands.md
Created August 15, 2024 13:37 — forked from basperheim/useful-ffmpeg-commands.md
Useful FFmpeg commands

Useful FFmpeg Commands

Remove Metadata from Video File

To remove metadata from a video file using FFmpeg, you can use the following command:

ffmpeg -i input.mp4 -map_metadata -1 -c:v copy -c:a copy output.mp4
@amdest
amdest / gist:2935783
Created June 15, 2012 10:35
Twitter Bootstrap modal auto-width
// https://github.com/twitter/bootstrap/issues/675#issuecomment-6184243
$('#feedback-modal').modal({
backdrop: true,
keyboard: true
}).css({
'width': function () {
return ($(document).width() * .9) + 'px';
},
'margin-left': function () {
@amdest
amdest / refinery_nav.html.erb
Created March 26, 2012 18:45
Rails & Refinery CMS: navigation
<nav id='<%= dom_id %>' class='<%= css %>'>
<ul>
<%= render :partial => '/refinery/menu_branch', :collection => roots,
:locals => {
:hide_children => hide_children,
:sibling_count => (roots.length - 1),
:apply_css => true #if you don't care about class='first' class='last' or class='selected' set apply_css to false for speed.
} -%>
</ul>
</nav>