The open sources ones have mostly rotted away, and the others are paid.
<% content_for :head do %>
<%= stylesheet_link_tag('https://cdnjs.cloudflare.com/ajax/libs/Trumbowyg/2.9.4/ui/trumbowyg.css') %>
<% end %>| #!/bin/bash | |
| # extract jpg from PDF | |
| # based on a script edited by Purch | |
| ##################################### | |
| if [ -z $1 ];then echo Give target directory; exit 0;fi | |
| find "$1" -depth -name '*.pdf' | while read file ; do | |
| directory=$(dirname "$file") | |
| oldfilename=$(basename "$file") |
The open sources ones have mostly rotted away, and the others are paid.
<% content_for :head do %>
<%= stylesheet_link_tag('https://cdnjs.cloudflare.com/ajax/libs/Trumbowyg/2.9.4/ui/trumbowyg.css') %>
<% end %>| // for single item | |
| convert -density 150 -antialias "input_file_name.pdf" -append -resize 1024x -quality 100 "output_file_name.png" | |
| // for bulk | |
| mogrify -format png -alpha off -density 150 -quality 100 -resize 1024 *.pdf |
If you want to raise an argument error with a clearer message
def process_thing(account: nil, thing: nil)
raise(ArgumentError.new("processing requires an account")) if account.blank?
raise(ArgumentError.new("Must have a Thing to process")) if thing.blank?
# ... Do the actual work
end| {% for video in site.static_files %} | |
| {% if video.path contains 'img/videos' %} | |
| <video muted playsinline> | |
| <source src="{{ site.baseurl }}{{ video.path }}" type="video/mp4"> | |
| </video> | |
| {% endif %} | |
| {% endfor %} |
| #! /bin/bash | |
| # The Purpose of this Script is to batch convert and compress any video file to mp4 format | |
| # | |
| # WARNING: LOSSY COMPRESSION !!! | |
| # Variable used: | |
| # sourcedir is the directory where to be converted videos are. Converted video will be saved in the same folder | |
| # usage: |
convert input.png \
\( -clone 0 -resize 128x128 -write icon-128.png \) \
\( -clone 0 -resize 96x96 -write icon-96.png \) \
\( -clone 0 -resize 48x48 -write icon-48.png \) \
\( -clone 0 -resize 16x16 -write icon-16.png \)| javascript: var d = document, | |
| w = window, | |
| e = w.getSelection, | |
| k = d.getSelection, | |
| x = d.selection, | |
| s = e ? e() : k ? k() : x ? x.createRange().text : 0, | |
| f = 'http://awesomewebsite.com/bookmarklet/iframe', | |
| l = d.location, | |
| e = encodeURIComponent, | |
| u = f + '?u=' + e(l.href) + '&t=' + e(d.title) + '&s=' + e(s) + '&v=4'; |
| class SomeController | |
| def asin_params | |
| # comma or semicolon, optionally surrounded by whitespace | |
| # or | |
| # two or more whitespace characters | |
| # or | |
| # any number of newline characters | |
| String(params[:asins]) | |
| .split(/ \s*[,;]\s* | \s{2,} | [\r\n]+/x) | |
| .select { |item| item.length > 8 } |
https://en.wikipedia.org/wiki/Shelf-ready_packaging