This is how you can use Watir inside of org-mode..!
First off, you need to have Ruby blocks working.
Second, you need to have both the watir and watir-webdriver
| ;; Write to and create file | |
| global _start | |
| section .text | |
| _start: | |
| ;; sys_open(file, permissions) | |
| mov rax, 2 ; sys_open | |
| mov rdi, file ; file | |
| mov rsi, 2 ; Read/Write permissions | |
| syscall |
| #!/bin/bash | |
| ([ -z "$1" ] || [ -n "$2" ]) && cat <<EOF && exit 1 | |
| wordparam: Find words you can make with the short parameters of commands. | |
| Author: Matthew (Archenoth) MacLean | |
| Usage: "$0 <command>" | |
| EOF | |
| man $1 &>/dev/null || { |
| #!/usr/bin/perl | |
| use LWP::Simple; | |
| # Not cheating at all. Nope. Not at all. Nothing to see here... | |
| getprint "http://www.classnamer.com/index.txt"; |
| #!/usr/bin/perl | |
| # | |
| # Site scraping PDF downloader: By Matthew (Archenoth) MacLean. | |
| # | |
| # This downloader will scan for all PDF links on the URL you pass in | |
| # and download them to their respective files in your current working | |
| # directory. | |
| # | |
| # You will need to install the Crypt::SSLeay CPAN module to download PDFs | |
| # on HTTPS servers. |
| #!/usr/bin/env ruby | |
| require 'nokogiri' | |
| require 'net/http' | |
| http = Net::HTTP.new("old.reddit.com", 443) | |
| http.use_ssl = true | |
| get = Net::HTTP::Get.new("/r/nocontext/", { | |
| 'User-Agent' => 'A fortune script that returns random /r/nocontext titles (Without context of course) (By /u/archenoth)' | |
| }) |
| (defun detect-bom (filePath) | |
| "Given a filepath, plays BOM BOM BOOOOOM if the file has a BOM" | |
| (with-temp-buffer | |
| (insert-file-contents-literally filePath) | |
| (let ((bom (decode-coding-string (buffer-substring-no-properties 1 4) 'utf-8))) | |
| (when (string= bom (string ?\uFEFF)) | |
| (play-sound-file "bombombom.wav"))))) | |
| (add-hook 'find-file-hook (lambda () (detect-bom buffer-file-name))) |
I hereby claim:
To claim this, I am signing this object:
| #!/data/data/com.termux/files/usr/bin/bash | |
| # This script 100% requires termux-services to be installed | |
| if ! dpkg -L termux-services 2>&1 >/dev/null; then | |
| echo "Requires termux-services package to be installed." >&2 | |
| read -r -p "Would you like me to install that now? (y/n) " INSTALL >&2 | |
| if [ "$INSTALL" != "y" ]; then | |
| echo "Aborting..." >&2 | |
| exit 1 |
| extra-keys = [ \ | |
| ['ESC', '7', 'UP', '9', '\\\''], \ | |
| ['TAB', 'LEFT', '5', 'RIGHT', '*'], \ | |
| ['=', '1', 'DOWN', '3', 'ENTER'] \ | |
| ] |