Skip to content

Instantly share code, notes, and snippets.

View albatrocity's full-sized avatar

Ross Brown albatrocity

  • Kansas City, KS
  • 01:15 (UTC -05:00)
View GitHub Profile
@whoisryosuke
whoisryosuke / markdown-directory-tree.md
Created July 27, 2020 21:03
Markdown / Documentation - Generate Markdown-friendly directory / folder tree structure - @see: https://stackoverflow.com/a/23990108
  1. Install the Linux package tree using Homebrew: brew install tree
  2. Run the tree command on any directory to generate a Markdown friendly structure: tree your-directory

You can save it to a file by piping the results into a text file: tree . >> directory-structure.md

Example

packages/button
├── lib
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active April 28, 2025 07:08
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@joelongstreet
joelongstreet / buttWipe.js
Created November 13, 2013 14:02
remove endless gobs of garbage produced by the world's worst text editor... MICROSOFT WORD
// Pasting from Microsoft word is an ABSOLUTE DISASTER
// this method removes the endless gobs of garbage produced
// by the world's worst, yet most popular, text editor
// Requires jQuery
var cleanHTML = function(pastedString){
// If this looks like some kind of raunchy ass microsoft bull shit,
// rip off it's effing <HEAD></HEAD>
var headRegex = new RegExp("<head[\\d\\D]*?\/head>", "g");
pastedString = pastedString.replace(headRegex, '');
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')