├── btsync ├── SyncIgnore └── btsync-synology-nas-command.txt ├── nmtui └── nmtui.txt ├── php ├── phpinfo.php ├── auto_copyrightyear.php ├── bash.php ├── php_run_bash.php ├── redirect_url.php ├── escape_xml_tags.php ├── file.php ├── get_users_ip.php └── set_contentype_for_xml.php ├── html ├── mailto.html ├── unordered_list.html ├── image_link.html ├── link_with_title.html ├── skype_link.html ├── iphone_dial.html ├── apple_touch_icon.html ├── favicon.html ├── rss_feed_include.html ├── utf-8 encoding meta tag.html ├── html_4.01_strict.html ├── ie_conditional_comments.html ├── xhtml_1.1_doctype.xhtml ├── html_4.01_frameset.html ├── html_4.01_transitional.html ├── xhtml_1_strict.xhtml ├── xhtml_1_frameset.xhtml ├── xhtml_1_transitional.xhtml ├── webp-fallback.html ├── safari 5 user agent string.html ├── meta_description.html ├── ul_filled_with_links.html ├── absolute_center_image.html ├── html5_figure_block.html ├── sticky_footer.html ├── html5_aside.html ├── html5_article.html ├── html5 video media queries.html └── xhtml_page.xhtml ├── macosx ├── ruby │ ├── ruby shabang.rb │ └── ruby_upgrade.txt ├── sips │ ├── sips_jpg.sh │ ├── sips_pad_to_height.sh │ ├── sips_crop.sh │ └── sips_resample.sh ├── textutil │ └── text_to_speech.sh ├── disable_quartine.txt ├── show_ipv6_address.sh ├── bless_hard_drive.txt ├── macbackup.sh ├── empty_the_trash.sh ├── get_mac_address.sh ├── osascript_bash_template.sh ├── redirect_create_new_file.sh ├── bash_check_ostype.sh ├── show_wifi_network.sh ├── touch_file_shortcut.sh ├── listallhardwareports.sh ├── apple_remote_events_sleep.txt ├── ds_store │ ├── delete_ds_store.sh │ └── dot_clean.sh ├── mac-install-from-anywhere.md ├── comm_compare_two_directories.sh ├── mac_ maintenance _script.sh ├── leopard_show_users_and_groups.txt ├── mac-ssh │ └── config ├── reveal_open_firmwarepassword.py ├── kill_by_process.sh ├── set mtu size.txt ├── growl │ └── growlnotify.sh ├── list_preferred_wireless_networks.sh ├── mac-nfs.md ├── quick_look.sh ├── box.net_webdav_settings.txt ├── google chrome security.txt ├── find_mac_osx_version_on_command_line.txt ├── unistall_xcode.sh ├── adblock_google_preview.txt ├── hosts │ └── reload_hosts.sh ├── mail copy urls.txt ├── restart_a_filevault_encrypted_system.sh ├── list_most_used_terminal_commands.sh ├── directory │ ├── directory.sh │ └── directory_check.sh ├── apache │ ├── apache_restart_mac_osx.sh │ └── apachectl_commands.sh ├── Mac_osx_tcpdump.txt ├── textmate │ ├── textmate_export_theme_as_css.txt │ └── zen coding tab key.txt ├── lion │ └── Lion wif file transfer fix.txt ├── show_os_version_from_command_line_(mac).sh ├── ngrep_install_macosx.sh ├── check_if_mac_is_64_bit.sh ├── mac_osx_open_command.sh ├── mail_from_the_command_line_mac_osx.sh ├── flush_dns.sh ├── mac set dns servers for a service.sh ├── open_firmware_override.txt ├── remove_dots.sh ├── vnc │ └── lion_vnc_ssh_tunnel.sh ├── hide_username_in_login_window.txt ├── automator_from_the_command_line.sh ├── evernote │ └── evernote_to_rtfd.sh └── hacking │ └── mac_osx_10.4_password_reset.sh ├── sox ├── sox-effects │ ├── 2gain.txt │ ├── 4cmp.txt │ ├── 1ns.txt │ └── 3eq.txt ├── sox-fifo-wav.sh └── sox.sh ├── squid ├── video-ads.acl ├── squid-block-ip-address.sh ├── ERR_BLOCKED └── squid-youtube.sh ├── bash ├── braces.sh ├── user-id.sh ├── 00_listargs.sh ├── core-audio.sh ├── printf_new_line.sh ├── while_read.sh ├── arguments.sh ├── file_exists.sh ├── loop.sh ├── rename_prefix.sh ├── backup.sh ├── unset-function.sh ├── file_exists2.sh ├── printf.sh ├── subroutine.sh ├── bash-url-decode.sh ├── echo_supress_new_line.sh ├── hello_world.sh ├── arguments-in-scripts.sh ├── file.sh ├── subroutine2.sh ├── bash_alias.sh ├── space_delimiter_with_cut_command.sh ├── symbolic_link.sh ├── count_loop.sh ├── speedtest.sh ├── colour_in_the_terminal.sh ├── fmt_paragrapghs.sh ├── read.sh ├── yanking-text.sh ├── rename_jpegs.sh ├── bashrc_default.sh ├── if.sh ├── uppercase-lowercase-in-terminal.sh ├── file-extension ├── getting_timestamp_into_bash_script.sh ├── pngcrush_for_compressing_images.sh ├── bash_script_template.sh ├── check-if-script-was-run-as-root.sh ├── Show_only_hidden_files.sh ├── remove_dots.sh ├── notify.sh ├── select.sh ├── printf_columns.sh ├── bash_arrays.sh ├── brackets.sh ├── check_exit_status_of_a_command.sh ├── arg.sh ├── unix_remove_non-empty_directory.sh └── mount_webdav.sh ├── docker ├── apache │ ├── apache-docker │ │ └── Dockerfile │ └── apache-docker.sh ├── docker-bash.sh └── docker-registry │ └── docker-registry-storage │ └── Dockerfile ├── html5-video └── html │ ├── landscape.css │ └── portrait.css ├── python ├── python-shebang.py ├── requests.md ├── python-markdown-install.sh ├── pip-uninstall-install.org ├── lxml-cssselect-install.md └── python-decode-url.org ├── perl ├── hello-world.pl ├── perl-command-line.pl └── strip_http_headers.pl ├── gollum-wiki └── server │ ├── cron.sh │ ├── wiki-sync.sh │ ├── users.yml │ └── gollum-hook.txt ├── mpd ├── playlists │ └── LBC973.m3u └── mpd-smb-share.org ├── javascript ├── cookie-catcher │ ├── js.js │ └── inject-cookie.js ├── ipad iphone prevent default scroll.js ├── ipad prevent default scroll.js └── fadein.js ├── pandoc ├── metadata.yaml ├── pandoc-webclipper │ ├── mimeinfo.cache │ ├── pandoc-protocol.desktop │ └── pandoc-bookmarklet.js ├── html5-base64.org ├── templates-setup.org ├── markdown-raw-html.org ├── metadata-yaml.org ├── parse-raw-html.org └── epub-fonts-css-metadata.org ├── virtualbox └── virtualbox.conf ├── cat ├── cat.sh └── cat-redirection.org ├── css ├── css_hidding.css ├── clearing_div.css ├── ipad disable copy and paste.css ├── border_radious.css ├── css_transform_scale.css ├── form_placeholder.css ├── iphone dont resize text.css ├── absolute_center_image_2.css ├── centre_div_negative_margins.css ├── css_box_shadow.css ├── ipad disable callout sheet to save images.css ├── css_centering.css ├── webkit-font-smoothing.css ├── css_reflection.css ├── test_selection_colour.css ├── html5_display_block.css ├── absolute_center_image.css ├── absolute_center_image_3.css ├── Custom.css ├── clearfix_all_browsers.css ├── rounded_borders.css └── progress bar.css ├── tig └── tig.sh ├── emacs ├── emacs-capture-protocol │ ├── readability.txt │ ├── emacs-capture │ ├── emacs-capture.desktop │ └── org-protocol.desktop ├── dired-toggle-details.org ├── org-mode-copy-url.org ├── display-line-numbers.org ├── eval-region.org ├── magit-view-file-at-commit.org ├── ido-mode.org ├── narrowing-widening-org-mode.org └── tramp-sudo.org ├── freebsd ├── bash-dotfiles │ └── .bash_profile ├── dbus.org ├── partition.org ├── bluetooth-stop.org ├── list-disks.org ├── pf-reload.org ├── emacs-freebsd.org ├── pkg-autoremove.org ├── sxiv.org ├── vlc3.org ├── fix-mbr.org ├── pkg-info-list.org ├── emacs-devel.org ├── pinentry-curses.org ├── pkg-info-show-message.org ├── sysrc.org ├── w3m-img.org ├── xsel-install.org ├── chrome-disable-gpu.org ├── wpa_supplicant.org ├── python3.org ├── mpd.org └── pkg-list-installed-packages.org ├── m3u8 ├── image.m3u8 └── start-stop.m3u8 ├── tee └── tee.sh ├── git ├── gitk.org ├── log.org ├── remove-all.org ├── diff.org ├── colour.org ├── log-graphs.org ├── add-brackets.org ├── discard-changes.org ├── remove-file-from-being-tracked.org ├── exclude └── git-show.org ├── unbound └── debian-unbound │ └── etc │ └── resolv.conf ├── mplayer ├── mplayer-usb-audio.sh ├── mplayer-headphones.sh ├── mplayer-play-raw-pcm.sh ├── mplayer-internal-speakers-usb-audio.sh ├── mplayer_full screen_on_second_display.sh ├── mp4box_commands.sh └── mplayer_config.txt ├── vim ├── nerdtree-tip.txt ├── vim-use-system-clipboard.txt ├── vim-cd.sh └── vim-aspell.sh ├── xcode ├── xcode tips.txt ├── applicationShouldTerminateAfterLastWindowClosed.txt └── super_init.m ├── applescript ├── mute_volume.scpt ├── wake on lan.scpt ├── import_into_evernote.scpt ├── Mac Scripting Overview.scpt ├── vlc mediastreamsegmenter.scpt ├── lion_fullscreen_screensharing.scpt └── Save A List of URLs From Your Evernote Items As A File.scpt ├── kodi ├── xbmc turn off embeded subs in mkv.txt ├── advancedsettings.xml ├── xbmc_install.sh ├── xsessions │ └── kodi.desktop ├── audio_delay_for_xbmc_airplay.sh ├── p2p-streams-acestream-fix.txt └── xbmc-linux-install.sh ├── openbsd ├── set-hostname.sh ├── openbsd-suspend.sh ├── pf-firewall-allow-ssh.sh ├── pf.conf ├── python-pip-openbsd-install.sh └── pandoc-openbsd.sh ├── ip ├── ip-show-ip-address.org └── list-network-devices.org ├── ngrep ├── ngrep_install.sh ├── ngrep_block_site.sh └── ngrep_kill_tcp_connection.sh ├── nmcli └── nmcli.sh ├── tesseract └── tesseract-ocr.sh ├── ubuntu ├── old-root-scripts │ ├── backlight-off │ └── backlight-on ├── ubuntu-nixpkgs-wsl │ └── .config │ │ └── yt-dlp │ │ └── config ├── ubuntu-upgrade.org ├── nognome_notifications_setup │ ├── nognome_notifications │ └── nognome_notifications.desktop ├── disable-ubuntu-apt-news.org ├── xsessions.org ├── gnome-window-always-on-top.org ├── xdg-desktop-portal-gnome.org ├── set-default-terminal.org └── gnome-login-keyring.org ├── assembly └── JustExit.s ├── fc-cache └── fc-cache.org ├── google ├── google-server-directories.md └── google_webcache.txt ├── mtr └── mtr.sh ├── netstat ├── netstat-tupac.org └── netstat-network-data-transfer-rates.org ├── openvpn ├── doas-namespace │ └── namespace └── sudo-namespace │ └── namespace ├── tar ├── untar-files.org └── tar-files.org ├── tcpflow └── tcpflow.sh ├── type └── type.org ├── vlc ├── vlc-duplicate-stream.txt ├── vlc.m3u8 ├── vlc-cache-gen.md ├── vlc-alsa-spdif-fix.txt ├── vlc-lua.org └── vlc-fix.org ├── df └── show-hard-drive-size.org ├── du └── show-file-size.org ├── inkscape └── inkscape-pdf.md ├── ping ├── ping_on_a_network_interface.sh └── ping-with-date.sh ├── pulseaudio └── pulseaudio-restart.sh ├── andriod ├── adb kill-server.sh ├── asound.conf ├── android usb tethering mac.txt └── android backup.sh ├── cd ├── cd_to_previous_directory.org └── cd-last-history-command.org ├── nfs ├── nfts-server.org └── nfs-common.org ├── nodejs ├── nodejs.sh └── nodejs-install.sh ├── w3m ├── cgi-bin │ └── run_command.cgi ├── root-cgi-bin │ └── run_command.cgi ├── w3m-variables.org └── w3m-dump.org ├── wireshark ├── wireshark-get-filter.sh ├── wireshark-filters.txt ├── openbsd-wireshark-non-root.sh └── wireshark-rtmp.sh ├── apt └── apt-mark.org ├── bash-completion └── reload_bash_completion_file.sh ├── history ├── run-last-command.org ├── clear-terminal-history.org └── history-save-as-script.org ├── mpv ├── mpv-install.org ├── mpv.conf ├── mpv-stereo.org ├── mpv-ytdl.org ├── mpv-video-filters.org └── mpv-miliseconds.org ├── namebench └── namebench.sh ├── obs-studio └── obs-wayland.org ├── subversion ├── websvn.conf ├── svn_reverting.sh ├── subversionProject.sh └── subversion_repo_on_an_external_hard_drive.txt ├── tty └── clear-login-tty.org ├── uniq └── uniq-show-duplicates.org ├── cp └── cp-braces.org ├── curl ├── curl-external-ip.org ├── curl-determine-webserver.org ├── curl-download-with-pause.org ├── curl-download-a-series-of-urls.org ├── curl-time-to-first-byte.org ├── id-a-web-server.org └── curl-download-iso.org ├── dns └── get-dns-server.org ├── i3-wm └── i3-wm.org ├── imagemagick ├── convert-pdf-to-png.md └── convert.org ├── kindle └── kindle-hack.txt ├── sudo ├── su-preserve-user-environment.org ├── sudo-preserve-enviornment.org └── run-last-command-in-history-with-sudo.org ├── top └── top-redirect-to-file-with-tee.sh ├── arch-linux ├── yaourt-update-packages.org ├── dnsutils-arch.org ├── pacman-upgrade-packages.org ├── pacman-gpg-keys.org ├── arch-set-time.org ├── alsa-audio-archlinux.org ├── yaourt-remove-package-and-dependencies.org ├── android-fastboot-adb-install.org ├── gpg-pacman-fix.org ├── gparted-arch.org ├── pacman-backup-packages.org ├── services │ ├── home │ │ └── username │ │ │ └── .config │ │ │ └── systemd │ │ │ └── user │ │ │ └── mpd.service │ └── etc │ │ └── systemd │ │ └── system │ │ └── btsync.service ├── gvfs-mtp-mount-android.org └── wireshark-arch.org ├── geektool └── scripts │ ├── show_disk_usage.sh │ └── get_dns_server_geektool.sh ├── oathtool ├── oathtool.org └── oathtool-install.org ├── tr ├── tr-convert-case.org ├── tr-replace-characters.org └── tr-convert-dos-to-unix.org ├── wget ├── check-for-404s.org ├── mirror-website.org ├── download-html-page.org ├── wget-urls-from-file.org ├── wget-site.org └── directory-prefix.org ├── base64 ├── base64.org └── base64-decode-text-file.org ├── chmod ├── make-bash-file-executable.org ├── chmod-remove-permissions.org └── chmod-match-file-permissions.org ├── find ├── find-large-files.org ├── find-and-zip-file.org ├── find-remove-dot-slash.org ├── find-xargs.org ├── find-change-file-extension.org ├── find-symlinks.org ├── find-files-mkdir-mv-files.org ├── find-file-and-cat.org ├── find-convert-uppercase-filenames-to-lowercase.org ├── find-and-basename.org └── remove-executable-bit-recursively-from-files-not-directories.org ├── firejail ├── firejail-firefox.org └── firejail.org ├── grep ├── find-grep.org ├── grep-http-links.org ├── grep-clipboard-for-http-links.org ├── grep-files-for-links-to-jpgs.org ├── grep-files-for-links.org └── remove-comments.org ├── sed ├── remove-first-2-characters.org ├── prepend-text-to-file.org ├── remove-comments-and-whitespace.org ├── find-http-links.org ├── strip-html-tags.org ├── find-image-urls-in-html.org ├── prepend-domain.org ├── remove-md-extension.org ├── wrap-string-in-quotes.org ├── sed-tips.org ├── remove-characters-from-start.org ├── markdown-remove-domain.org ├── find-local-links-add-html-extension.org └── find-local-links.org ├── synology ├── synology htaccess.txt ├── synology restart ssh.sh └── find-and-remove-eadir-directories.sh ├── html-xml-utils └── html-xml-utils.org ├── jpegtran └── jpegtran.sh ├── rsync ├── rsync-home-backup.sh ├── rsync-system-backup.sh ├── rsync-backup-script.sh └── rsync-system-backup-to-usb.sh ├── sabnzbd └── sabnzbd.sh ├── ssh ├── tar-over-ssh.org ├── show-host-key-fingerprint-as-image.org ├── ssh-socks5.org ├── regenerate-a-public-ssh-key-using-a-private-key.org └── socks5-self-closing-tunnel.org ├── date └── date.org ├── dnssec-trigger └── dnssec-trigger.org ├── egrep └── egrep-links.org ├── ls ├── ls-wc.org └── ls-arguments.org ├── raspberry-pi ├── synergy install raspberry pi.sh ├── kill_pulseaudio.sh ├── Raspberry Pi find serial number for license key.txt └── raspbmc │ ├── boot │ └── config.txt │ └── advancedsettings.xml ├── st ├── st-increase-font-size.org └── st.desktop ├── urxvt └── urxvt-ncurses.org ├── arp └── arp.org ├── stat └── stat-octal-file-permissions.org ├── strings └── strings.sh ├── uberwriter └── uberwriter-install.sh ├── awk ├── awk-csv-to-plain-text.org ├── awk-grab-second-field.org ├── get-last-line-of-file.org ├── awk-extract-text-between-brackets.org ├── print-first-and-second-line.org ├── awk.org └── awk_sed_remove_double_quotes.org ├── cut └── cut.org ├── debian ├── debian-add-repo.org └── backport.org ├── diff └── diff-tips.org ├── dnscrypt-proxy └── dnscrypt-conf │ ├── dnscrypt-proxy-service-override.conf │ └── dnscrypt-proxy-socket-override.conf ├── dnsmasq └── swiss-privacy-foundation-dns.sh ├── gparted └── hfs-support-gparted.org ├── gvfs-mount └── gvfs-mount.org ├── iptables └── iptables-persistent.org ├── newsboat └── youtube-newsboat │ └── youtube-rss ├── tmux └── tmux-rename-window.org ├── tv-maxe └── tv-maxe-install.sh ├── unset └── unset-function.org ├── weather └── wttr-weather.org ├── chkrootkit └── chkrootkit_install.sh ├── ranger └── ranger.sh ├── sha1sum └── sha1sum-for-password.org ├── tshark ├── tshark-search-for-hosts.sh └── tshark-command.sh ├── watch └── watch-ps-ffmpeg.org ├── flatpak └── yaru-blue-dark-theme.org ├── read └── read.sh ├── squeezelite └── squeezelite-dac.sh ├── tor └── tor-dont-start-automatically.sh ├── xmonad └── xmonad.desktop ├── youtube-dl ├── youtube-dl-download-channel.org ├── youtube-dl-best.org ├── youtube-dl-aria2.org └── youtube-dl-download-subtitles.org ├── beautiful-soup └── beautiful-soup-install.sh ├── csvkit └── csvjoin-join-2-csv-files.org ├── lsblk └── lsblk.org ├── psad ├── psad_noemail.sh └── psad_install.sh ├── ssl └── https-check-if-site-supports-ssl.org ├── v4l-utils └── v4l-utils.org ├── ffmpeg ├── extract-video.org ├── extarct-audio.org ├── change-framerate.org ├── scale-pad.org ├── colour-to-grayscale.org ├── ffmpeg-copy.org ├── ffmpeg_thumbsmov.sh ├── crop-pad.org ├── dump-audio-from-video.org ├── ffmpeg-scale.org ├── ffmpeg_thumbsmp4.sh ├── extract-audio.org ├── raw-audio.org ├── dump-audio-stream-from-video.org ├── dump-audio-with-map.org ├── video-from-audio-and-image.org ├── create-thumbnails.org ├── batch-process.org ├── rtp-multicast-streaming.org ├── copy-video-convert-audio-pcm.org ├── convert-wav-to-aac.org ├── cat-files.org ├── convert-wav-to-mp3.org ├── overlay-filter.org ├── hls-video-recording.org ├── play-file-puseaudio-output.org ├── yuv4mpegpipe.org └── convert-flac-to-aac.org ├── ffprobe └── ffprobe-show-streams.org ├── ifconfig └── ifconfig-wlan.org ├── ncftp └── ncftpget.org ├── netcat ├── netcat-google.org ├── banner-grabbing.org └── udp-server.org ├── nmap └── nmap-router-scanning.sh ├── zsh ├── zsh-completions-location.org └── zsh-setup.org ├── cups ├── cups-pdf.sh └── cups.sh ├── firefox ├── firefox-75-config.tx ├── picture-in-picture-keyboard.org ├── firefox-audio.txt ├── firefox-config.txt └── picture-in-picture-shortcut.org ├── mysql └── mysql-login-bypass.sh ├── ogr2ogr └── geojson-to-kml.org ├── proxychains ├── proxychains-setup.sh └── proxychains-arch.sh ├── xrandr ├── xprofile └── xrandr-toggle-hdmi.sh ├── kali-linux ├── mdk.sh └── cookie.txt ├── rename └── rename-to-lowercase.sh ├── tcpdump ├── tcpdump-capture-traffic-from-host.org └── tcpdump-get-request.org ├── irc └── weechat.sh ├── libreoffice ├── libreoffice-debian.md └── libreoffice.sh ├── lsof └── lsof.sh ├── lynx ├── lynx-mplayer.org ├── lynx-dump-links.org └── lynx-dump-links-pipe-into-grep.org ├── sort └── sort-remove-duplicates.org ├── blender └── blender-cuda-nvidia.org ├── fzf └── fzf-list.org ├── libvirt ├── setfacl-libvirt.org ├── libvirt.org └── libvirt-start-default-network.org ├── chromium-browser ├── chrome-force-ssl-for-domain.txt ├── chromium-flash-player-install.sh └── scriptsafe-evernote.txt ├── dig └── dig.org ├── nixpkgs └── mac-nixpkgs.org ├── openssl └── openssl-htpasswd.org ├── stdin ├── stdin-echo-argument-from-cat.sh └── stdin-redirect-input.org ├── surfraw └── surfraw.org ├── sxhkd └── reload-sxhkd.org ├── tail └── tail_show_lines.sh ├── tree └── tree.sh ├── at ├── at.org └── input ├── dos2unix └── dos2unix-convert-lin-ending-to-unix.org ├── get-iplayer └── get-iplayer-record-live-tv.sh ├── homebrew └── homebrew-appdir.org ├── xargs └── xargs-create-directorys.org ├── markdown └── retext-markdown-editor-install.sh ├── mosh └── mosh autocomplete ssh hosh names.sh ├── shnsplit └── shnsplit.org ├── gpsbabel ├── gpx-track-speed.org └── convert-gpx-to-srt.org ├── arpspoof └── arp_spoof_mitm.sh ├── meld └── meld-over-ssh.org ├── openntpd └── openntpd.org ├── handbrake └── hardbrake-install.org ├── barrier └── barrier-iptables.org ├── exiftool └── exiftool-equirectangular.org ├── xmodmap └── Xmodmap ├── zfs ├── zfs-mount-snapshot.org ├── zfs-list-snapshot-by-date.org ├── zdb-get-zpool-name-from-device.org └── zfs-get-mountpoint.org ├── xkill └── xkill-application-windows.org ├── chown └── chown-set-drive-permission-on-drive.org ├── thunderbird └── thunderbird.sh ├── pstree └── pstree.sh ├── bourne-shell └── read-file ├── dict └── dict.org ├── wine └── wine-linux-install.sh ├── apache └── no-www.org ├── latex └── latex-movie15.sh ├── ruby └── ruby-rvm-install.sh ├── wkhtmltopdf └── wkhtmltopdf-install.sh ├── tvheadend └── tvheadend-linux │ └── scripts │ └── cron.sh ├── privoxy └── privoxy-iptables.sh ├── zbar-tools └── zbar-tools.org ├── apg └── apg-password-generator.org ├── ublock-origin └── ublock-twitter.txt ├── ffplay └── ffplay-fullscreen.org ├── echo └── echo-nc.org ├── head └── head-show-lines.org ├── bc └── bash-calculator.sh └── dpkg └── dpkg-reconfigure.org /btsync/SyncIgnore: -------------------------------------------------------------------------------- 1 | @eaDir 2 | -------------------------------------------------------------------------------- /nmtui/nmtui.txt: -------------------------------------------------------------------------------- 1 | nmtui 2 | -------------------------------------------------------------------------------- /php/phpinfo.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /html/mailto.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /html/unordered_list.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /macosx/ruby/ruby shabang.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby -------------------------------------------------------------------------------- /sox/sox-effects/2gain.txt: -------------------------------------------------------------------------------- 1 | gain -b -n -3 2 | -------------------------------------------------------------------------------- /squid/video-ads.acl: -------------------------------------------------------------------------------- 1 | mp.adverts.itv.com 2 | -------------------------------------------------------------------------------- /bash/braces.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ls *.{jpg,gif} -------------------------------------------------------------------------------- /html/image_link.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /html/link_with_title.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker/apache/apache-docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM httpd:2.4 2 | -------------------------------------------------------------------------------- /html5-video/html/landscape.css: -------------------------------------------------------------------------------- 1 | li {display: inline;} 2 | -------------------------------------------------------------------------------- /html5-video/html/portrait.css: -------------------------------------------------------------------------------- 1 | li {display: block;} 2 | -------------------------------------------------------------------------------- /php/auto_copyrightyear.php: -------------------------------------------------------------------------------- 1 | © -------------------------------------------------------------------------------- /bash/user-id.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # show user id 4 | id 5 | -------------------------------------------------------------------------------- /html/skype_link.html: -------------------------------------------------------------------------------- 1 | Call Me -------------------------------------------------------------------------------- /python/python-shebang.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | 4 | -------------------------------------------------------------------------------- /html/iphone_dial.html: -------------------------------------------------------------------------------- 1 | Number here -------------------------------------------------------------------------------- /perl/hello-world.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | print "Hello, world!\n"; 3 | -------------------------------------------------------------------------------- /gollum-wiki/server/cron.sh: -------------------------------------------------------------------------------- 1 | */5 * * * * /home/wiki-sync.sh &> /dev/null -------------------------------------------------------------------------------- /mpd/playlists/LBC973.m3u: -------------------------------------------------------------------------------- 1 | http://ice-the.musicradio.com:80/LBC973 2 | -------------------------------------------------------------------------------- /php/bash.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /php/php_run_bash.php: -------------------------------------------------------------------------------- 1 | bash 4 | -------------------------------------------------------------------------------- /html/apple_touch_icon.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /html/favicon.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /macosx/sips/sips_jpg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sips --setProperty format jpeg *.NEF --out . -------------------------------------------------------------------------------- /macosx/textutil/text_to_speech.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | say -f infile.txt -o outfile.aiff -------------------------------------------------------------------------------- /tig/tig.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # tig ncurses git viewer 4 | 5 | sudo pacman -S tig 6 | -------------------------------------------------------------------------------- /bash/core-audio.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | afconvert -f caff -d LEI16@44100 -c 1 in.wav out.caf -------------------------------------------------------------------------------- /css/clearing_div.css: -------------------------------------------------------------------------------- 1 | .clearing {clear:both; height:0; overflow:hidden; margin:-1px 0 0 0;} -------------------------------------------------------------------------------- /emacs/emacs-capture-protocol/readability.txt: -------------------------------------------------------------------------------- 1 | pip install --user readability-lxml 2 | 3 | -------------------------------------------------------------------------------- /macosx/disable_quartine.txt: -------------------------------------------------------------------------------- 1 | Snow Leopard 2 | 3 | xattr -d -r com.apple.quarantine filepath -------------------------------------------------------------------------------- /macosx/show_ipv6_address.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # show ipv6 address 4 | 5 | dns-sd -F 6 | -------------------------------------------------------------------------------- /bash/printf_new_line.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # printf new line \n 4 | 5 | printf "%s\n" something -------------------------------------------------------------------------------- /bash/while_read.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ls | while read file; do echo "file found: $file"; done -------------------------------------------------------------------------------- /freebsd/bash-dotfiles/.bash_profile: -------------------------------------------------------------------------------- 1 | # load ~/.bashrc 2 | [[ -f ~/.bashrc ]] && . ~/.bashrc 3 | -------------------------------------------------------------------------------- /m3u8/image.m3u8: -------------------------------------------------------------------------------- 1 | #EXTM3U 2 | 3 | #EXTINF:0, 01-image 4 | #EXTVLCOPT:image-duration=5 5 | output.png -------------------------------------------------------------------------------- /macosx/bless_hard_drive.txt: -------------------------------------------------------------------------------- 1 | sudo bless -folder /Volumes/Igor\ 1/System/Library/CoreServices 2 | -------------------------------------------------------------------------------- /macosx/macbackup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo asr -source / -target /Volumes/Air\ 1 -erase 4 | -------------------------------------------------------------------------------- /sox/sox-effects/4cmp.txt: -------------------------------------------------------------------------------- 1 | compand .5,1 6:-70,-36,-32,-28,-18,-24,-18,-18,-18,-12,-12 -5 -90 0.2 2 | -------------------------------------------------------------------------------- /tee/tee.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # tee command 4 | echo "this is some text" | tee output.txt 5 | -------------------------------------------------------------------------------- /bash/arguments.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | FIRST_ARGUMENT="$1" 4 | echo "Hello, world $FIRST_ARGUMENT!" -------------------------------------------------------------------------------- /bash/file_exists.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if ls mysillyfilename ; then 4 | echo "File exists." 5 | fi -------------------------------------------------------------------------------- /bash/loop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # bash for loop 4 | for f in $( ls /var/ ); do 5 | echo $f 6 | done -------------------------------------------------------------------------------- /git/gitk.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * basic git gui 3 | 4 | #+begin_src sh 5 | gitk 6 | #+end_src 7 | -------------------------------------------------------------------------------- /html/rss_feed_include.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /html/utf-8 encoding meta tag.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /macosx/empty_the_trash.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # empty the trash 4 | cd ~/.Trash 5 | chflags -R nouchg * -------------------------------------------------------------------------------- /unbound/debian-unbound/etc/resolv.conf: -------------------------------------------------------------------------------- 1 | # Generated by dnssec-trigger 0.13 2 | nameserver 127.0.0.1 3 | -------------------------------------------------------------------------------- /bash/rename_prefix.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for filename in *.mp4; do mv "$filename" "prefix_$filename"; done; -------------------------------------------------------------------------------- /macosx/get_mac_address.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # get mac address 4 | 5 | networksetup -getmacaddress Wi-Fi -------------------------------------------------------------------------------- /macosx/osascript_bash_template.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | osascript< foo.txt -------------------------------------------------------------------------------- /mplayer/mplayer-usb-audio.sh: -------------------------------------------------------------------------------- 1 | # mplayer config use usb audio device for audio 2 | ao=alsa:device=plughw=1 3 | -------------------------------------------------------------------------------- /php/redirect_url.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sox/sox-effects/1ns.txt: -------------------------------------------------------------------------------- 1 | compand .5,1 -inf,-40.1,-inf,-40,-40 0 -90 .1 2 | highpass 200 3 | lowpass 3000 4 | -------------------------------------------------------------------------------- /vim/nerdtree-tip.txt: -------------------------------------------------------------------------------- 1 | toggle nerdtree sidebar 2 | ,, 3 | 4 | switch between windows 5 | ctrl w w 6 | 7 | -------------------------------------------------------------------------------- /xcode/xcode tips.txt: -------------------------------------------------------------------------------- 1 | xcode 2 | 3 | autosave 4 | 5 | 6 | + (BOOL)autosavesInPlace { 7 | return YES; 8 | } -------------------------------------------------------------------------------- /applescript/mute_volume.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canyon289/cerberus/master/applescript/mute_volume.scpt -------------------------------------------------------------------------------- /applescript/wake on lan.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canyon289/cerberus/master/applescript/wake on lan.scpt -------------------------------------------------------------------------------- /css/ipad disable copy and paste.css: -------------------------------------------------------------------------------- 1 | /* Disable copy and paste */ 2 | 3 | article {-webkit-user-select: none;} -------------------------------------------------------------------------------- /kodi/xbmc turn off embeded subs in mkv.txt: -------------------------------------------------------------------------------- 1 | xbmc turn off embeded subs in mkv 2 | 3 | stop the video and press t -------------------------------------------------------------------------------- /macosx/bash_check_ostype.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ "$OSTYPE" =~ ^darwin ]]; then 4 | echo "im a mac" 5 | fi -------------------------------------------------------------------------------- /macosx/show_wifi_network.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # show wifi network 4 | 5 | networksetup -getairportnetwork en0 -------------------------------------------------------------------------------- /macosx/touch_file_shortcut.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # touch file shortcut 4 | 5 | # touch file.txt 6 | > file.txt -------------------------------------------------------------------------------- /openbsd/set-hostname.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # strip domain name from hostname 4 | sudo hostname -s hal9000 5 | -------------------------------------------------------------------------------- /bash/backup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | OF=myhome_directory_$(date +%Y%m%d).tar.gz 3 | tar -czf $OF /Users/djwilcox/Desktop/bak -------------------------------------------------------------------------------- /bash/unset-function.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # unset function 4 | #=============== 5 | 6 | unset -f functio-name 7 | -------------------------------------------------------------------------------- /css/border_radious.css: -------------------------------------------------------------------------------- 1 | { -moz-border-radius: 4px;-webkit-border-radius: 4px;border:1px solid #fff;background:#fff;} -------------------------------------------------------------------------------- /css/css_transform_scale.css: -------------------------------------------------------------------------------- 1 | .scale { 2 | -webkit-transform: scale(2.0); 3 | -moz-transform: scale(2.0); 4 | } -------------------------------------------------------------------------------- /html/html_4.01_strict.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ip/ip-show-ip-address.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * show ip address 3 | 4 | #+begin_src sh 5 | ip a 6 | #+end_src 7 | -------------------------------------------------------------------------------- /macosx/listallhardwareports.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # listallhardwareports 4 | 5 | networksetup -listallhardwareports -------------------------------------------------------------------------------- /ngrep/ngrep_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ngrep install to kill tcp connections 4 | sudo apt-get install ngrep 5 | -------------------------------------------------------------------------------- /nmcli/nmcli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # network manager cli 4 | #==================== 5 | 6 | nmcli dev show ens9 7 | -------------------------------------------------------------------------------- /python/requests.md: -------------------------------------------------------------------------------- 1 | # python 3 requests 2 | 3 | * Freebsd 4 | 5 | ``` 6 | sudo pkg install py36-requests 7 | ``` 8 | -------------------------------------------------------------------------------- /tesseract/tesseract-ocr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # tesseract ocr 4 | sudo pacman -S tesseract tesseract-data-eng 5 | -------------------------------------------------------------------------------- /ubuntu/old-root-scripts/backlight-off: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo 0 > /sys/class/leds/smc::kbd_backlight/brightness 4 | -------------------------------------------------------------------------------- /ubuntu/old-root-scripts/backlight-on: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo 255 > /sys/class/leds/smc::kbd_backlight/brightness 4 | -------------------------------------------------------------------------------- /vim/vim-use-system-clipboard.txt: -------------------------------------------------------------------------------- 1 | # use system clipboard add to your ~/.vimrc file 2 | set clipboard=unnamedplus 3 | -------------------------------------------------------------------------------- /assembly/JustExit.s: -------------------------------------------------------------------------------- 1 | .text 2 | 3 | .globl _start 4 | 5 | _start: 6 | movl $1, %eax 7 | movl $0, %ebx 8 | int $0x80 9 | -------------------------------------------------------------------------------- /bash/file_exists2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ls mysillyfilename 4 | if [ $? = 0 ] ; then 5 | echo "File exists." 6 | fi -------------------------------------------------------------------------------- /bash/printf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | printf "What is your name? -> " 3 | read NAME 4 | echo "Hello, $NAME. Nice to meet you." -------------------------------------------------------------------------------- /bash/subroutine.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mysub() 4 | { 5 | echo "Arg 1: $1" 6 | } 7 | 8 | mysub "This is an arg" -------------------------------------------------------------------------------- /fc-cache/fc-cache.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * fc-cache 3 | 4 | #+begin_src sh 5 | sudo fc-cache -f -v 6 | #+end_src 7 | -------------------------------------------------------------------------------- /git/log.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * git log 3 | 4 | #+begin_src sh 5 | git log --pretty="%h, %cn, %cr" 6 | #+end_src 7 | -------------------------------------------------------------------------------- /google/google-server-directories.md: -------------------------------------------------------------------------------- 1 | # google query for directory listsings 2 | 3 | intitle:index.of "Parent Directory" 4 | -------------------------------------------------------------------------------- /html/ie_conditional_comments.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /macosx/apple_remote_events_sleep.txt: -------------------------------------------------------------------------------- 1 | tell application "Finder" of machine "eppc://192.168.1.9" 2 | sleep 3 | end tell -------------------------------------------------------------------------------- /macosx/ds_store/delete_ds_store.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # delete ds store 4 | 5 | find . -name '*.DS_Store' -type f -delete -------------------------------------------------------------------------------- /macosx/mac-install-from-anywhere.md: -------------------------------------------------------------------------------- 1 | # mac install from anywhere 2 | 3 | ``` 4 | sudo spctl --mater-disable 5 | ``` 6 | -------------------------------------------------------------------------------- /macosx/sips/sips_pad_to_height.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # pad images to height 4 | 5 | sips --padToHeightWidth 77 32 *.png -------------------------------------------------------------------------------- /mtr/mtr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # mrt - traceroute and ping 4 | #========================== 5 | 6 | mtr google.com 7 | -------------------------------------------------------------------------------- /netstat/netstat-tupac.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * netstat 3 | 4 | #+begin_src sh 5 | netstat -tupac 6 | #+end_src 7 | -------------------------------------------------------------------------------- /ngrep/ngrep_block_site.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo ngrep -q 'facebook.com' 4 | 5 | ngrep -q -W byline 'facebook.com' 6 | -------------------------------------------------------------------------------- /openvpn/doas-namespace/namespace: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # open in namespace 4 | ip netns exec vpn doas -u djwilcox -- "$@" 5 | -------------------------------------------------------------------------------- /python/python-markdown-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # python-markdown package install 4 | sudo pip install markdown 5 | -------------------------------------------------------------------------------- /tar/untar-files.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * untar file 3 | 4 | #+begin_src sh 5 | tar -zxvf file.tgz 6 | #+end_src 7 | -------------------------------------------------------------------------------- /tcpflow/tcpflow.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # tcpflow install 4 | #================ 5 | 6 | sudo apt-get install tcpflow 7 | -------------------------------------------------------------------------------- /type/type.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * display command location 3 | 4 | #+begin_src sh 5 | type -p vim 6 | #+end_src 7 | -------------------------------------------------------------------------------- /vlc/vlc-duplicate-stream.txt: -------------------------------------------------------------------------------- 1 | # vlc duplicate stream 2 | 3 | #duplicate{dst="http{mux=ts,dst=:6881/tv.asf}",dst=display} -------------------------------------------------------------------------------- /css/form_placeholder.css: -------------------------------------------------------------------------------- 1 | input::-webkit-input-placeholder, 2 | input:-moz-placeholder { 3 | color: rgba(170,170,170,1); 4 | } -------------------------------------------------------------------------------- /df/show-hard-drive-size.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * show hard drive size 3 | 4 | #+begin_src sh 5 | df -h 6 | #+end_src 7 | -------------------------------------------------------------------------------- /du/show-file-size.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * show file size 3 | 4 | #+begin_src sh 5 | du -sh somedirectory 6 | #+end_src 7 | -------------------------------------------------------------------------------- /git/remove-all.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * git remove all 3 | 4 | #+begin_src sh 5 | git rm -r --cached *.* 6 | #+end_src 7 | -------------------------------------------------------------------------------- /html/xhtml_1.1_doctype.xhtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inkscape/inkscape-pdf.md: -------------------------------------------------------------------------------- 1 | # inkscape convert svg to pdf 2 | 3 | ``` 4 | inkscape graph.svg --export-pdf=graph.pdf 5 | ``` 6 | -------------------------------------------------------------------------------- /macosx/comm_compare_two_directories.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # compare 2 directories 4 | comm -3 <(ls -1 folder1) <(ls -1 folder2) -------------------------------------------------------------------------------- /macosx/mac_ maintenance _script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # run maintenance scripts 4 | 5 | sudo periodic daily weekly monthly -------------------------------------------------------------------------------- /openvpn/sudo-namespace/namespace: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # open in namespace 4 | sudo ip netns exec vpn sudo -u $(whoami) -- "$@" 5 | -------------------------------------------------------------------------------- /ping/ping_on_a_network_interface.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ping on a network interface 4 | 5 | 6 | ping -I wlan0 google.com -------------------------------------------------------------------------------- /pulseaudio/pulseaudio-restart.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # restart pulseaudio 4 | #=================== 5 | 6 | pulseaudio -k 7 | -------------------------------------------------------------------------------- /andriod/adb kill-server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # stop adb server 4 | adb kill-server 5 | 6 | # start adb server 7 | adb start-server -------------------------------------------------------------------------------- /applescript/import_into_evernote.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canyon289/cerberus/master/applescript/import_into_evernote.scpt -------------------------------------------------------------------------------- /bash/bash-url-decode.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "url-goes-here" \ 4 | | sed -e's/%\([0-9A-F][0-9A-F]\)/\\\\\x\1/g' | xargs echo -e -------------------------------------------------------------------------------- /cd/cd_to_previous_directory.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * cd to previous directory 3 | 4 | #+begin_src sh 5 | cd - 6 | #+end_src 7 | -------------------------------------------------------------------------------- /css/iphone dont resize text.css: -------------------------------------------------------------------------------- 1 | @media only screen and (max-device-width: 480px) { 2 | html {-webkit-text-size-adjust: none;} 3 | } -------------------------------------------------------------------------------- /git/diff.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * git diff meld 3 | 4 | #+begin_src sh 5 | meld "$2" "$5" > /dev/null 2>&1 6 | #+end_src 7 | -------------------------------------------------------------------------------- /html/html_4.01_frameset.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /macosx/leopard_show_users_and_groups.txt: -------------------------------------------------------------------------------- 1 | leopard show users and groups 2 | 3 | 4 | dscacheutil -q group 5 | 6 | dscacheutil -q user -------------------------------------------------------------------------------- /macosx/mac-ssh/config: -------------------------------------------------------------------------------- 1 | # ssh aliases 2 | 3 | Host * 4 | UseKeychain yes 5 | AddKeysToAgent yes 6 | IdentityFile ~/.ssh/id_rsa -------------------------------------------------------------------------------- /nfs/nfts-server.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | * nfs client 3 | 4 | #+begin_src sh 5 | sudo apt-get install nfs-common 6 | #+end_src 7 | -------------------------------------------------------------------------------- /nodejs/nodejs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # nodejs arch linux install 4 | #========================== 5 | 6 | sudo pacman -S nodejs 7 | -------------------------------------------------------------------------------- /w3m/cgi-bin/run_command.cgi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # run w3m command from clipboard 4 | printf "%s\r\n" "W3m-control: $(xsel -opsb)"; 5 | -------------------------------------------------------------------------------- /wireshark/wireshark-get-filter.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # wireshark filter for get requests 4 | http.request.uri contains "GET" 5 | -------------------------------------------------------------------------------- /applescript/Mac Scripting Overview.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canyon289/cerberus/master/applescript/Mac Scripting Overview.scpt -------------------------------------------------------------------------------- /applescript/vlc mediastreamsegmenter.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canyon289/cerberus/master/applescript/vlc mediastreamsegmenter.scpt -------------------------------------------------------------------------------- /apt/apt-mark.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * show user installed packages 3 | 4 | #+begin_src sh 5 | apt-mark showmanual 6 | #+end_src 7 | -------------------------------------------------------------------------------- /bash-completion/reload_bash_completion_file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # reload bash completion file 4 | . /etc/bash_completion.d/filename -------------------------------------------------------------------------------- /bash/echo_supress_new_line.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # echo_supress_new_line. 4 | 5 | # -n 6 | # echo -n prompt 7 | 8 | echo -n prompt -------------------------------------------------------------------------------- /bash/hello_world.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # declare STRING variable 3 | STRING="Hello World" 4 | #print variable on a screen 5 | echo $STRING -------------------------------------------------------------------------------- /emacs/dired-toggle-details.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * dired toggle details 3 | 4 | toggle dired details view by pressing shift + 9 5 | -------------------------------------------------------------------------------- /git/colour.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * enable git color 3 | 4 | #+begin_src sh 5 | git config --global color.ui true 6 | #+end_src 7 | -------------------------------------------------------------------------------- /history/run-last-command.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * run last command in bash history 3 | 4 | #+begin_src sh 5 | !! 6 | #+end_src 7 | -------------------------------------------------------------------------------- /html/html_4.01_transitional.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /html/xhtml_1_strict.xhtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mpv/mpv-install.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * mpv video player install 3 | 4 | #+begin_src sh 5 | sudo apt install mpv 6 | #+end_src 7 | -------------------------------------------------------------------------------- /namebench/namebench.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # namebench test dns 4 | #=================== 5 | 6 | sudo apt-get install namebench 7 | -------------------------------------------------------------------------------- /obs-studio/obs-wayland.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | * obs wayland 3 | 4 | #+begin_src sh 5 | doas apt install qtwayland5 6 | #+end_src 7 | -------------------------------------------------------------------------------- /subversion/websvn.conf: -------------------------------------------------------------------------------- 1 | 2 | Order allow,deny 3 | Allow from all 4 | -------------------------------------------------------------------------------- /tty/clear-login-tty.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * clear login tty 3 | 4 | #+begin_src sh 5 | sudo clear >> /etc/issue 6 | #+end_src 7 | -------------------------------------------------------------------------------- /uniq/uniq-show-duplicates.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * show duplicates with uniq -d 3 | 4 | #+begin_src sh 5 | uniq -d 6 | #+end_src 7 | -------------------------------------------------------------------------------- /andriod/asound.conf: -------------------------------------------------------------------------------- 1 | pcm.usbdac { 2 | type hw; 3 | card Audio; 4 | } 5 | ctl.usbdac { 6 | type hw; 7 | card Audio; 8 | } 9 | pcm.!default usbdac -------------------------------------------------------------------------------- /bash/arguments-in-scripts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # the $1 variable is the first argument you pass to the script 4 | ARG=$1 5 | ls $ARG 6 | -------------------------------------------------------------------------------- /bash/file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | file="./file" 3 | if [ -e $file ]; then 4 | echo "File exists" 5 | else 6 | echo "File does not exists" 7 | fi -------------------------------------------------------------------------------- /cp/cp-braces.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * back up files with braces 3 | 4 | #+begin_src sh 5 | sudo cp /etc/fstab{,.backup} 6 | #+end_src 7 | -------------------------------------------------------------------------------- /css/absolute_center_image_2.css: -------------------------------------------------------------------------------- 1 | html { 2 | width:100%; 3 | height:100%; 4 | background:url(logo.png) center center no-repeat; 5 | } -------------------------------------------------------------------------------- /curl/curl-external-ip.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * find external ip address 3 | 4 | #+begin_src sh 5 | curl ip.appspot.com 6 | #+end_src 7 | -------------------------------------------------------------------------------- /dns/get-dns-server.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * get dns server 3 | 4 | #+begin_src sh 5 | networksetup -getdnsservers Wi-Fi 6 | #+end_src 7 | -------------------------------------------------------------------------------- /emacs/emacs-capture-protocol/emacs-capture: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | emacsclient -c -F "((name . \"emacs-capture\") (height . 10) (width . 80))" "$@" 3 | -------------------------------------------------------------------------------- /history/clear-terminal-history.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * clear terminal history 3 | 4 | #+begin_src sh 5 | history -c 6 | #+end_src 7 | -------------------------------------------------------------------------------- /html/xhtml_1_frameset.xhtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /i3-wm/i3-wm.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * i3 window manager 3 | 4 | #+begin_src sh 5 | sudo apt install i3-wm i3status i3lock 6 | #+end_src 7 | -------------------------------------------------------------------------------- /imagemagick/convert-pdf-to-png.md: -------------------------------------------------------------------------------- 1 | # convert pdf to png 2 | 3 | ``` 4 | convert -density 300 -trim cover.pdf -quality 100 cover.png 5 | ``` 6 | -------------------------------------------------------------------------------- /kindle/kindle-hack.txt: -------------------------------------------------------------------------------- 1 | Set kindle to download non drm books 2 | 3 | sudo chmod -x /Applications/Kindle.app/Contents/MacOS/renderer-test 4 | -------------------------------------------------------------------------------- /kodi/advancedsettings.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /macosx/reveal_open_firmwarepassword.py: -------------------------------------------------------------------------------- 1 | python -c "print ''.join(chr(int(c, 16) ^ 170) for c in '`sudo nvram security-password`'.split('%')[1:])" -------------------------------------------------------------------------------- /php/escape_xml_tags.php: -------------------------------------------------------------------------------- 1 | '; 4 | ?> -------------------------------------------------------------------------------- /sudo/su-preserve-user-environment.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * preserve user environment 3 | 4 | #+begin_src sh 5 | su -lm 6 | #+end_src 7 | -------------------------------------------------------------------------------- /top/top-redirect-to-file-with-tee.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # redirect top with tee 4 | #====================== 5 | 6 | top -b | tee top.txt 7 | -------------------------------------------------------------------------------- /vlc/vlc.m3u8: -------------------------------------------------------------------------------- 1 | #EXTM3U 2 | #EXTINF:0,ccloud 3 | #EXTVLCOPT:http-referer= 4 | #EXTVLCOPT:http-user-agent= 5 | https://example.com/video.m3u8 6 | -------------------------------------------------------------------------------- /wireshark/wireshark-filters.txt: -------------------------------------------------------------------------------- 1 | # get filter 2 | http.request.method == "GET" 3 | 4 | # http response 200 5 | http.response.code == 200 6 | -------------------------------------------------------------------------------- /applescript/lion_fullscreen_screensharing.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canyon289/cerberus/master/applescript/lion_fullscreen_screensharing.scpt -------------------------------------------------------------------------------- /arch-linux/yaourt-update-packages.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * yaourt update packages 3 | 4 | #+begin_src sh 5 | yaourt -Syua 6 | #+end_src 7 | -------------------------------------------------------------------------------- /bash/subroutine2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mysub() 4 | { 5 | return 3 6 | } 7 | 8 | mysub "This is an arg" 9 | echo "Subroutine returned $?" -------------------------------------------------------------------------------- /css/centre_div_negative_margins.css: -------------------------------------------------------------------------------- 1 | div { position: absolute; left: 50%; width: 500px; margin-left: -250px; /*half the width of the div*/} -------------------------------------------------------------------------------- /geektool/scripts/show_disk_usage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # show disk usage 4 | 5 | df -hl | grep 'disk1' | awk '{print $4"/"$2" free ("$5" used)"}' -------------------------------------------------------------------------------- /git/log-graphs.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * git log graph 3 | 4 | #+begin_src sh 5 | git log --oneline --all --graph --decorate 6 | #+end_src 7 | -------------------------------------------------------------------------------- /macosx/kill_by_process.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # get the process id 4 | ps -cvx | grep "someapp" 5 | 6 | # kill by process 7 | kill -s KILL 35178 -------------------------------------------------------------------------------- /macosx/set mtu size.txt: -------------------------------------------------------------------------------- 1 | # set mtu size 2 | 3 | # find mtu size 4 | networksetup -getMTU 5 | 6 | # set mtu size 7 | networksetup -setMTU en0 1453 -------------------------------------------------------------------------------- /oathtool/oathtool.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * oath-toolkit oathtool install 3 | 4 | #+begin_src sh 5 | sudo apt install oathtool 6 | #+end_src 7 | -------------------------------------------------------------------------------- /tr/tr-convert-case.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * tr convert case 3 | 4 | #+begin_src sh 5 | tr 'A-Z' 'a-z' after.txt 6 | #+end_src 7 | -------------------------------------------------------------------------------- /vim/vim-cd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | " automatically change current directory to that of the file in the buffer 4 | autocmd BufEnter * cd %:p:h 5 | -------------------------------------------------------------------------------- /wget/check-for-404s.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * wget check for 404s 3 | 4 | #+begin_src sh 5 | wget get --spider -nd -r 6 | #+end_src 7 | -------------------------------------------------------------------------------- /arch-linux/dnsutils-arch.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * install nslookup host dig 3 | 4 | #+begin_src sh 5 | sudo pacman -S dnsutils 6 | #+end_src 7 | -------------------------------------------------------------------------------- /arch-linux/pacman-upgrade-packages.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * pacman update packages 3 | 4 | #+begin_src sh 5 | sudo pacman -Syu 6 | #+end_src 7 | -------------------------------------------------------------------------------- /base64/base64.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * base64 encode inmage 3 | 4 | #+begin_src sh 5 | base64 image-in.jpg > image-out.b64 6 | #+end_src 7 | 8 | -------------------------------------------------------------------------------- /bash/bash_alias.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ============== 4 | # = Bash Alias = 5 | # ============== 6 | 7 | 8 | 9 | ln -s path/to/source path/to/alias -------------------------------------------------------------------------------- /btsync/btsync-synology-nas-command.txt: -------------------------------------------------------------------------------- 1 | # start btsync on synology nas and specify config file 2 | ./btsync --config ~/.btsync/btsync.conf 3 | 4 | 5 | -------------------------------------------------------------------------------- /chmod/make-bash-file-executable.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * make bash file executable 3 | 4 | #+begin_src sh 5 | chmod +x file.sh 6 | #+end_src 7 | -------------------------------------------------------------------------------- /find/find-large-files.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * find files larger than 100mb 3 | 4 | #+begin_src sh 5 | find . -type f -size +100M 6 | #+end_src 7 | -------------------------------------------------------------------------------- /firejail/firejail-firefox.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * firejail 3 | 4 | #+begin_src sh 5 | firejail --caps.drop=all --seccomp firefox 6 | #+end_src 7 | -------------------------------------------------------------------------------- /geektool/scripts/get_dns_server_geektool.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # get dns server 4 | 5 | printf "DNS: "; networksetup -getdnsservers Wi-Fi | tr '\n' ' ' -------------------------------------------------------------------------------- /grep/find-grep.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * find and grep 3 | 4 | #+begin_src sh 5 | find . -name "*.txt" -exec grep -il "lorem" {} \; 6 | #+end_src 7 | -------------------------------------------------------------------------------- /html/xhtml_1_transitional.xhtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nfs/nfs-common.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * nfs client and server install 3 | 4 | #+begin_src sh 5 | sudo apt-get install nfs-common 6 | #+end_src 7 | -------------------------------------------------------------------------------- /ngrep/ngrep_kill_tcp_connection.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # kill tcp connection matching regular expression 4 | ngrep -q -d any 'facebook.com' -K 10 5 | -------------------------------------------------------------------------------- /sed/remove-first-2-characters.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * sed remove first 2 characters 3 | 4 | #+begin_src sh 5 | sed 's/^..//g' 6 | #+end_src 7 | -------------------------------------------------------------------------------- /synology/synology htaccess.txt: -------------------------------------------------------------------------------- 1 | AuthType Basic 2 | AuthName "Restricted resources" 3 | AuthUserFile /usr/syno/apache/.htpasswd 4 | Require valid-user 5 | -------------------------------------------------------------------------------- /w3m/root-cgi-bin/run_command.cgi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # run w3m command from clipboard 4 | printf "%s\r\n" "W3m-control: COMMAND $(xsel -opsb)"; 5 | 6 | -------------------------------------------------------------------------------- /bash/space_delimiter_with_cut_command.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # space as a delimiter with the cut command 4 | 5 | grep "stuff" text.txt | cut -d ' ' -f1 6 | -------------------------------------------------------------------------------- /bash/symbolic_link.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ================= 4 | # = symbolic link = 5 | # ================= 6 | 7 | ln -s /path/to/source /path/to/alias -------------------------------------------------------------------------------- /css/css_box_shadow.css: -------------------------------------------------------------------------------- 1 | .shadow { 2 | box-shadow: 5px 5px 5px #ccc; 3 | -moz-box-shadow: 5px 5px 5px #ccc; 4 | -webkit-box-shadow: 5px 5px 5px #ccc; 5 | } -------------------------------------------------------------------------------- /css/ipad disable callout sheet to save images.css: -------------------------------------------------------------------------------- 1 | 2 | /* Disable callout sheet to save images */ 3 | 4 | img {-webkit-touch-callout: none;} 5 | 6 | 7 | -------------------------------------------------------------------------------- /git/add-brackets.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * git add multiple files by bracketing 3 | 4 | #+begin_src sh 5 | git add image[123456].jpg 6 | #+end_src 7 | -------------------------------------------------------------------------------- /grep/grep-http-links.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * grep http links 3 | 4 | #+begin_src sh 5 | grep -oP '(?<=href=")[^"]*(?=")' file.html 6 | #+end_src 7 | -------------------------------------------------------------------------------- /html-xml-utils/html-xml-utils.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * html xml utils 3 | 4 | #+begin_src sh 5 | sudo apt-get install html-xml-utils 6 | #+end_src 7 | -------------------------------------------------------------------------------- /html/webp-fallback.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /jpegtran/jpegtran.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # jpegtran 4 | #========= 5 | 6 | # rotate image 90 degrees 7 | jpegtran -rot 90 -trim infile.JPG > outfile.jpg 8 | -------------------------------------------------------------------------------- /macosx/growl/growlnotify.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # growlnotify 4 | 5 | # -t = title 6 | # -m = message 7 | 8 | /usr/local/bin/growlnotify -t "foo" -m "bar" -------------------------------------------------------------------------------- /macosx/list_preferred_wireless_networks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # list preferred wireless networks 4 | 5 | networksetup -listpreferredwirelessnetworks en0 -------------------------------------------------------------------------------- /rsync/rsync-home-backup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # rsync home backup 4 | #================== 5 | 6 | rsync --delete -azvv /home/djwilcox /media/djwilcox/usb 7 | -------------------------------------------------------------------------------- /sabnzbd/sabnzbd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # sabnzbd usenet client install 4 | #============================== 5 | 6 | sudo apt-get install sabnzbdplus par2 7 | -------------------------------------------------------------------------------- /ssh/tar-over-ssh.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * tar over ssh 3 | 4 | #+begin_src sh 5 | tar cvpzf -/ | ssh user@host ""cat > /backup.tar.gz"" 6 | #+end_src 7 | -------------------------------------------------------------------------------- /sudo/sudo-preserve-enviornment.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * switch to sudo and preserve user enviornment 3 | 4 | #+begin_src sh 5 | su - 6 | #+end_src 7 | -------------------------------------------------------------------------------- /ubuntu/ubuntu-nixpkgs-wsl/.config/yt-dlp/config: -------------------------------------------------------------------------------- 1 | # external downloader aria2 2 | --downloader aria2c --downloader-args aria2c:'-c -j 3 -x 3 -s 3 -k 1M' 3 | -------------------------------------------------------------------------------- /ubuntu/ubuntu-upgrade.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * ubuntu upgrade 3 | 4 | #+begin_src sh 5 | sudo do-release-upgrade -d --allow-third-party 6 | #+end_src 7 | -------------------------------------------------------------------------------- /vlc/vlc-cache-gen.md: -------------------------------------------------------------------------------- 1 | # vlc cache gen 2 | 3 | clear vlc plugin cache 4 | 5 | ``` 6 | sudo /usr/local/lib/vlc/vlc-cache-gen /usr/local/lib/vlc/plugins/ 7 | ``` -------------------------------------------------------------------------------- /arch-linux/pacman-gpg-keys.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * refresh pgp keys for packages 3 | 4 | #+begin_src sh 5 | sudo pacman-key --refresh-keys 6 | #+end_src 7 | -------------------------------------------------------------------------------- /bash/count_loop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | COUNT=0 4 | while [ $COUNT -lt '4' ] ; do 5 | echo "COUNT IS $COUNT" 6 | COUNT="$(expr "$COUNT" '+' '1')" 7 | done -------------------------------------------------------------------------------- /bash/speedtest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # speedtest 4 | #========== 5 | 6 | wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip 7 | 8 | -------------------------------------------------------------------------------- /css/css_centering.css: -------------------------------------------------------------------------------- 1 | **SelectionInsertionPlaceholder** {position: absolute;width: 100px;height: 100px;top: 50%;left: 50%;margin-top: -50px;margin-left: -50px;} -------------------------------------------------------------------------------- /date/date.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * date - year month day 3 | 4 | date with year month day 5 | 6 | #+begin_src sh 7 | $(date +"%Y-%m-%d") 8 | #+end_src 9 | -------------------------------------------------------------------------------- /dnssec-trigger/dnssec-trigger.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * dnssec-trigger 3 | 4 | #+begin_src sh 5 | sudo apt install unbound dnssec-trigger 6 | #+end_src 7 | -------------------------------------------------------------------------------- /egrep/egrep-links.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * egrep links 3 | 4 | #+begin_src sh 5 | egrep -o "(mailto|ftp|http(s)?://){1}[^'\"]+" file.html 6 | #+end_src 7 | -------------------------------------------------------------------------------- /html/safari 5 user agent string.html: -------------------------------------------------------------------------------- 1 | Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; zh-cn) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5 -------------------------------------------------------------------------------- /ls/ls-wc.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * use ls and wc to count files in a directory 3 | 4 | #+begin_src sh 5 | ls /usr/bin/ | sort | uniq | wc -l 6 | #+end_src 7 | -------------------------------------------------------------------------------- /netstat/netstat-network-data-transfer-rates.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * network data transfer rates 3 | 4 | #+begin_src sh 5 | netstat -w 1 6 | #+end_src 7 | -------------------------------------------------------------------------------- /raspberry-pi/synergy install raspberry pi.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # synergy install on Raspberry Pi 4 | 5 | sudo apt-get update 6 | sudo apt-get install synergy -------------------------------------------------------------------------------- /st/st-increase-font-size.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | * st terminal increase font size 3 | 4 | the default keybinding to increase font size is Ctrl+Shift+PageUp 5 | -------------------------------------------------------------------------------- /ubuntu/nognome_notifications_setup/nognome_notifications: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # kill gnome notifications 4 | 5 | pkill -f 'org.gnome.Shell.Notifications' 6 | 7 | -------------------------------------------------------------------------------- /urxvt/urxvt-ncurses.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * rxvt ncurces 3 | 4 | #+begin_src sh 5 | sudo apt install rxvt-unicode-256color ncurses-term 6 | #+end_src 7 | -------------------------------------------------------------------------------- /wget/mirror-website.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * wget mirror website 3 | 4 | #+begin_src sh 5 | wget -m http://textfiles.com/hacking/INTERNET/ 6 | #+end_src 7 | -------------------------------------------------------------------------------- /arch-linux/arch-set-time.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * arch set time 3 | 4 | #+begin_src sh 5 | sudo su 6 | timedatectl set-time "2014-09-26 15:06:00" 7 | #+end_src 8 | -------------------------------------------------------------------------------- /arp/arp.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * show arp table 6 | 7 | #+BEGIN_SRC sh 8 | arp -a 9 | #+END_SRC 10 | -------------------------------------------------------------------------------- /bash/colour_in_the_terminal.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ========================== 4 | # = Colour in the terminal = 5 | # ========================== 6 | 7 | ls -G 8 | -------------------------------------------------------------------------------- /curl/curl-determine-webserver.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * get to know what web server a site used 3 | 4 | #+begin_src sh 5 | curl -I www.google.com 6 | #+end_src 7 | -------------------------------------------------------------------------------- /history/history-save-as-script.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * history save last command as a script 3 | 4 | #+begin_src sh 5 | echo !! > script.sh 6 | #+end_src 7 | -------------------------------------------------------------------------------- /macosx/mac-nfs.md: -------------------------------------------------------------------------------- 1 | # mac mount nfs shares 2 | 3 | mac mount nfs share 4 | 5 | ``` 6 | sudo mount -o rw -t nfs 192.168.1.25:/music /Users/username/Music/mpd 7 | ``` 8 | -------------------------------------------------------------------------------- /sed/prepend-text-to-file.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * sed prepend 127.0.0.1 to file 3 | 4 | #+begin_src sh 5 | sed -i.bak 's/^/127.0.0.1 /' file.txt 6 | #+end_src 7 | -------------------------------------------------------------------------------- /sox/sox-effects/3eq.txt: -------------------------------------------------------------------------------- 1 | equalizer 189 0.7q -6.0 2 | equalizer 261 0.7q -5.0 3 | equalizer 829 0.7q -4.0 4 | equalizer 3089 0.7q -2.0 5 | equalizer 5000 0.7q -2.0 6 | -------------------------------------------------------------------------------- /stat/stat-octal-file-permissions.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * show octal version of file permission 3 | 4 | #+begin_src sh 5 | stat -f "%p" filename 6 | #+end_src 7 | -------------------------------------------------------------------------------- /strings/strings.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # strings 4 | #======== 5 | 6 | # search for the string my_string in a spreadsheet 7 | strings book1.xls | grep my_string 8 | -------------------------------------------------------------------------------- /sudo/run-last-command-in-history-with-sudo.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * run last command in history with sudo 3 | 4 | #+begin_src sh 5 | sudo !! 6 | #+end_src 7 | -------------------------------------------------------------------------------- /uberwriter/uberwriter-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo add-apt-repository ppa:w-vollprecht/ppa 4 | sudo apt-get update 5 | sudo apt-get install uberwriter 6 | 7 | -------------------------------------------------------------------------------- /ubuntu/disable-ubuntu-apt-news.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * disable ubuntu apt news 3 | 4 | #+begin_src sh 5 | sudo pro config set apt_news=false 6 | #+end_src 7 | -------------------------------------------------------------------------------- /awk/awk-csv-to-plain-text.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | * awk convert csv to plain text 3 | 4 | #+begin_src sh 5 | awk -v RS=, '$1' input.csv > output.txt 6 | #+end_src 7 | -------------------------------------------------------------------------------- /awk/awk-grab-second-field.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * awk grab second field 3 | 4 | #+begin_src sh 5 | awk '{print $2}' file.txt | sort | uniq > uniq.txt 6 | #+end_src 7 | -------------------------------------------------------------------------------- /awk/get-last-line-of-file.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * awk get the last line of a line 3 | 4 | #+begin_src sh 5 | awk 'END { printf("%f\n", $NF) }' input 6 | #+end_src 7 | -------------------------------------------------------------------------------- /bash/fmt_paragrapghs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # fmt command to wrap paragrapghs to line length 4 | 5 | # goal and maximum line length 6 | 7 | fmt 20 25 < in.txt > out.txt -------------------------------------------------------------------------------- /bash/read.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | printf "Type three numbers separated by 'q'. -> " 3 | IFS="q" 4 | read NUMBER1 NUMBER2 NUMBER3 5 | echo "You said: $NUMBER1, $NUMBER2, $NUMBER3" -------------------------------------------------------------------------------- /cat/cat-redirection.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * cat redirection 3 | 4 | #+begin_src sh 5 | cat << EOF > file 6 | line one 7 | line two 8 | EOF 9 | #+end_src 10 | -------------------------------------------------------------------------------- /css/webkit-font-smoothing.css: -------------------------------------------------------------------------------- 1 | -webkit-font-smoothing: none; 2 | 3 | -webkit-font-smoothing: subpixel-antialiased; 4 | 5 | -webkit-font-smoothing: antialiased; 6 | 7 | -------------------------------------------------------------------------------- /curl/curl-download-with-pause.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * curl download with pause 3 | 4 | #+begin_src sh 5 | curl -C - -O http://somedomain.com/file.pdf 6 | #+end_src 7 | -------------------------------------------------------------------------------- /cut/cut.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * cut 3 | 4 | display the third column delimited by a blank space 5 | 6 | #+begin_src sh 7 | ls -l | cut -d" " -f3 8 | #+end_src 9 | -------------------------------------------------------------------------------- /debian/debian-add-repo.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * add-apt-repository set up 3 | 4 | #+begin_src sh 5 | sudo apt install software-properties-common 6 | #+end_src 7 | 8 | -------------------------------------------------------------------------------- /diff/diff-tips.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * diff tips 3 | 4 | #+begin_src sh 5 | diff -qr directory1 directory2 | grep -v -e 'DS_Store' | sort > diff.txt 6 | #+end_src 7 | -------------------------------------------------------------------------------- /dnscrypt-proxy/dnscrypt-conf/dnscrypt-proxy-service-override.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | 3 | ExecStart= 4 | ExecStart=/usr/bin/dnscrypt-proxy -R dnscrypt.eu-nl --user=dnscrypt 5 | -------------------------------------------------------------------------------- /dnsmasq/swiss-privacy-foundation-dns.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # swiss privacy foundation dns 4 | #============================= 5 | 6 | 77.109.138.45 7 | 77.109.139.29 8 | -------------------------------------------------------------------------------- /find/find-and-zip-file.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * find and zip file 3 | 4 | #+begin_src sh 5 | find directory -name 'index.html' | zip -@ index.html.zip 6 | #+end_src 7 | -------------------------------------------------------------------------------- /gparted/hfs-support-gparted.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * hfs support for gparted 3 | 4 | #+begin_src sh 5 | sudo apt-get install hfsplus hfsutils hfsprogs 6 | #+end_src 7 | -------------------------------------------------------------------------------- /gvfs-mount/gvfs-mount.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * mount smb share (password saved in gnome keyring) 3 | 4 | #+begin_src sh 5 | gvfs-mount smb://nas/music 6 | #+end_src 7 | -------------------------------------------------------------------------------- /iptables/iptables-persistent.org: -------------------------------------------------------------------------------- 1 | * iptables-persistent 2 | 3 | iptables-persistent 4 | 5 | #+begin_src sh 6 | sudo apt-get install iptables-persistent 7 | #+end_src 8 | -------------------------------------------------------------------------------- /kodi/xbmc_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # xbmc install 4 | sudo add-apt-repository ppa:team-xbmc/ppa 5 | sudo apt-get update 6 | sudo apt-get install xbmc 7 | 8 | 9 | -------------------------------------------------------------------------------- /macosx/quick_look.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # =========================== 4 | # = quick look command line = 5 | # =========================== 6 | 7 | 8 | qlmanage -p filename -------------------------------------------------------------------------------- /macosx/sips/sips_crop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # crop images with sips 4 | 5 | # sips --cropToHeightWidth height width *.png 6 | 7 | sips --cropToHeightWidth 93 223 *.png -------------------------------------------------------------------------------- /mpv/mpv.conf: -------------------------------------------------------------------------------- 1 | # ao=alsa:device=[plughw:1] # internal speakers 2 | ao=alsa:device=[plughw:1] # usb dac 3 | softvol=no 4 | 5 | deinterlace=yes # deinterlace video for football -------------------------------------------------------------------------------- /newsboat/youtube-newsboat/youtube-rss: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | xsltproc "${HOME}/.config/newsboat/stylesheets/youtube-rss.xsl" "$1" - | sed 's/\ */
/g; s/^$/
/g' 4 | -------------------------------------------------------------------------------- /oathtool/oathtool-install.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * oathtool install for google 2 factor codes 3 | 4 | #+begin_src sh 5 | sudo apt-get install oathtool 6 | #+end_src 7 | -------------------------------------------------------------------------------- /openbsd/openbsd-suspend.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | # openbsd suspend 5 | #================ 6 | 7 | sudo vim /etc/sysctl.conf 8 | 9 | machdep.lidsuspend=1 10 | -------------------------------------------------------------------------------- /tmux/tmux-rename-window.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * tmux rename window 3 | 4 | #+begin_example 5 | tmux rename-window (prefix + ,) 6 | cmd a , 7 | #+end_example 8 | 9 | -------------------------------------------------------------------------------- /tv-maxe/tv-maxe-install.sh : -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # tv-maxe install 4 | sudo add-apt-repository ppa:venerix/pkg 5 | sudo apt-get update; sudo apt-get install tv-maxe 6 | -------------------------------------------------------------------------------- /unset/unset-function.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * unset a function, like unaliasing an alias 3 | 4 | #+begin_src sh 5 | unset -f my_function 6 | #+end_src 7 | 8 | 9 | -------------------------------------------------------------------------------- /weather/wttr-weather.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * wttr weather 3 | 4 | show the weather in the terminal 5 | 6 | #+begin_src sh 7 | curl wttr.in/london 8 | #+end_src 9 | -------------------------------------------------------------------------------- /wget/download-html-page.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * wget download single page 3 | 4 | #+begin_src sh 5 | wget -p -k http://example.com/index.html 6 | #+end_src 7 | 8 | -------------------------------------------------------------------------------- /xcode/applicationShouldTerminateAfterLastWindowClosed.txt: -------------------------------------------------------------------------------- 1 | - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication 2 | { 3 | return YES; 4 | } -------------------------------------------------------------------------------- /arch-linux/alsa-audio-archlinux.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * alsa audio arch linux 3 | 4 | #+begin_src sh 5 | sudo pacman -S alsa-lib alsa-utils alsa-plugins 6 | #+end_src 7 | -------------------------------------------------------------------------------- /base64/base64-decode-text-file.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * decode base64 encoded text file 3 | 4 | #+begin_src sh 5 | base64 -di textfile.txt > decoded.txt 6 | #+end_src 7 | -------------------------------------------------------------------------------- /chkrootkit/chkrootkit_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # check for rootkits with chkrootkit 4 | sudo apt-get install chkrootkit 5 | 6 | # run chkrootkit 7 | sudo chkrootkit 8 | -------------------------------------------------------------------------------- /emacs/org-mode-copy-url.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * org mode copy url 3 | 4 | copy a url from an org link 5 | 6 | #+begin_example 7 | C-c C-l C-a C-k C-g 8 | #+end_example 9 | -------------------------------------------------------------------------------- /google/google_webcache.txt: -------------------------------------------------------------------------------- 1 | google webcache to search anonymously 2 | 3 | http://webcache.googleusercontent.com/search?q=cache:http://okhelloyou.co.uk&hl=en&prmd=imvns&strip=1 -------------------------------------------------------------------------------- /macosx/box.net_webdav_settings.txt: -------------------------------------------------------------------------------- 1 | 2 | box.net webdav settings 3 | 4 | 5 | url 6 | 7 | http://box.net/dav// 8 | 9 | 10 | username: 11 | 12 | password: 13 | 14 | -------------------------------------------------------------------------------- /macosx/google chrome security.txt: -------------------------------------------------------------------------------- 1 | google chrome security 2 | 3 | # shortcut to administer https 4 | chrome://net-internals/ 5 | 6 | # shortcut to plugins page 7 | about:plugins -------------------------------------------------------------------------------- /mpv/mpv-stereo.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * mpv downmix to stereo 3 | 4 | mpv downmix audio 5 | 6 | #+begin_src sh 7 | mpv --audio-channels=stereo file.mkv 8 | #+end_src 9 | -------------------------------------------------------------------------------- /pandoc/pandoc-webclipper/mimeinfo.cache: -------------------------------------------------------------------------------- 1 | [MIME Cache] 2 | x-scheme-handler/org-protocol=org-protocol.desktop; 3 | x-scheme-handler/pandoc-protocol=pandoc-protocol.desktop; 4 | -------------------------------------------------------------------------------- /ranger/ranger.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ranger file manager 4 | sudo pacman -S ranger atool highlight w3m 5 | 6 | # copy ranger config to home 7 | ranger --copy-config=all 8 | -------------------------------------------------------------------------------- /sha1sum/sha1sum-for-password.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * create sha1sum for password 3 | 4 | #+begin_src sh 5 | echo -n password | sha1sum | awk '{print $1}' 6 | #+end_src 7 | -------------------------------------------------------------------------------- /tar/tar-files.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * compress a folder with tar to create a .tar.gz archive 3 | 4 | #+begin_src sh 5 | tar zcvf filename.tar.gz filename 6 | #+end_src 7 | -------------------------------------------------------------------------------- /tshark/tshark-search-for-hosts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # tshark search for hosts 4 | #======================== 5 | 6 | tshark -r file.pcap -q -z hosts,ipv4 > tshark-hosts.txt -------------------------------------------------------------------------------- /ubuntu/xsessions.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * xsessions directory 3 | 4 | xession directory for session files 5 | 6 | #+begin_src sh 7 | /usr/share/xsessions 8 | #+end_src 9 | -------------------------------------------------------------------------------- /vlc/vlc-alsa-spdif-fix.txt: -------------------------------------------------------------------------------- 1 | # fix for distorted audio with aac audio and alsa 2 | 3 | open vlc preferences, and then select audio 4 | 5 | uncheck: Use S/PDIF when available 6 | -------------------------------------------------------------------------------- /watch/watch-ps-ffmpeg.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * watch ffmpeg processes 3 | 4 | #+begin_src sh 5 | watch -n 1 "ps -C ffmpeg -o pid,comm,cmd,start,etime" 6 | #+end_src 7 | -------------------------------------------------------------------------------- /wget/wget-urls-from-file.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * download a list of urls from a text file with wget 3 | 4 | #+begin_src sh 5 | wget -i ~/Desktop/urls.txt 6 | #+end_src 7 | -------------------------------------------------------------------------------- /chmod/chmod-remove-permissions.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * remove write permission for group and other recurcivly 3 | 4 | #+begin_src sh 5 | chmod -R go-w filename 6 | #+end_src 7 | -------------------------------------------------------------------------------- /dnscrypt-proxy/dnscrypt-conf/dnscrypt-proxy-socket-override.conf: -------------------------------------------------------------------------------- 1 | [Socket] 2 | ListenStream= 3 | ListenDatagram= 4 | ListenStream=127.0.0.1:2053 5 | ListenDatagram=127.0.0.1:2053 6 | -------------------------------------------------------------------------------- /flatpak/yaru-blue-dark-theme.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * yaru blue dark theme 3 | 4 | #+begin_src sh 5 | flatpak install --user org.gtk.Gtk3theme.Yaru-Blue-dark 6 | #+end_src 7 | -------------------------------------------------------------------------------- /git/discard-changes.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * git discard changes 3 | 4 | discard changes in working directory 5 | 6 | #+begin_src sh 7 | git checkout -- . 8 | #+end_src 9 | -------------------------------------------------------------------------------- /macosx/find_mac_osx_version_on_command_line.txt: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # ======================== 4 | # = find mac osx version = 5 | # ======================== 6 | 7 | 8 | sw_vers -------------------------------------------------------------------------------- /macosx/unistall_xcode.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # =================== 4 | # = uninstall xcode = 5 | # =================== 6 | 7 | sudo /Developer/Library/uninstall-devtools --mode=all -------------------------------------------------------------------------------- /read/read.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # read readline 4 | 5 | read -erp "enter a directory path: " DIR 6 | 7 | # -e readline 8 | # -r var 9 | # -p prompt 10 | 11 | echo $DIR -------------------------------------------------------------------------------- /sed/remove-comments-and-whitespace.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * sed remove comments and whitespace 3 | 4 | #+begin_src sh 5 | sed '/ *#/d; /^ *$/d' -i squid.conf 6 | #+end_src 7 | -------------------------------------------------------------------------------- /squeezelite/squeezelite-dac.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # squeezelite install 4 | yaourt -S squeezelite-git 5 | 6 | # squeezelite dac 7 | squeezelite -o iec958:CARD=M192kHz,DEV=0 8 | -------------------------------------------------------------------------------- /ssh/show-host-key-fingerprint-as-image.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * show Host key fingerprint as image 3 | 4 | #+begin_src sh 5 | ssh -o VisualHostKey=yes user@host 6 | #+end_src 7 | -------------------------------------------------------------------------------- /st/st.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=st 4 | Comment=simple-terminal emulator for X 5 | Icon=utilities-terminal 6 | Exec=st 7 | Categories=System;TerminalEmulator -------------------------------------------------------------------------------- /tor/tor-dont-start-automatically.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # tor dont start automatically at boot 4 | #===================================== 5 | 6 | sudo update-rc.d tor disable 7 | -------------------------------------------------------------------------------- /xmonad/xmonad.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=XMonad 3 | Comment=Lightweight tiling window manager 4 | Exec=/home/username/.cache/xmonad/xmonad-x86_64-linux 5 | Type=XSession 6 | -------------------------------------------------------------------------------- /youtube-dl/youtube-dl-download-channel.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * youtube-dl download channel 3 | 4 | #+begin_src sh 5 | youtube-dl -citw ytuser:socialreporter 6 | #+end_src 7 | -------------------------------------------------------------------------------- /arch-linux/yaourt-remove-package-and-dependencies.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * yaourt remove package and dependencies 3 | 4 | #+begin_src sh 5 | yaourt -Rsn package-name 6 | #+end_src 7 | -------------------------------------------------------------------------------- /awk/awk-extract-text-between-brackets.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * awk extract text inside brackets 3 | 4 | #+begin_src sh 5 | awk -F'[][]' -v RS=" " '/http/ {print $2}' 6 | #+end_src 7 | -------------------------------------------------------------------------------- /beautiful-soup/beautiful-soup-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # beautiful soup python html parser 4 | #================================== 5 | 6 | sudo apt-get install python-bs4 7 | 8 | -------------------------------------------------------------------------------- /css/css_reflection.css: -------------------------------------------------------------------------------- 1 | .reflect{ 2 | -webkit-box-reflect:below 5px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(0.5, transparent), to(white)); 3 | } -------------------------------------------------------------------------------- /csvkit/csvjoin-join-2-csv-files.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * csvjoin 3 | 4 | join 2 csv files 5 | 6 | #+begin_src sh 7 | csvjoin input-1.csv input-2.csv > output.csv 8 | #+end_src 9 | -------------------------------------------------------------------------------- /find/find-remove-dot-slash.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * find remove from ./ from file names 3 | 4 | #+begin_src sh 5 | find . -type f -regex ".*\.md$" -printf '%P\n' 6 | #+end_src 7 | -------------------------------------------------------------------------------- /find/find-xargs.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * find separates lines with ASCII null characters 3 | 4 | #+begin_src sh 5 | find . -print0 | xargs -0 grep -l myxomatosis 6 | #+end_src 7 | -------------------------------------------------------------------------------- /grep/grep-clipboard-for-http-links.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * pipe in clipboard and grep for http links 3 | 4 | #+begin_src sh 5 | pbpaste | grep -o 'http://[^"]*' 6 | #+end_src 7 | -------------------------------------------------------------------------------- /html/meta_description.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /javascript/ipad iphone prevent default scroll.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', function() { 2 | document.ontouchmove = function(e){ e.preventDefault(); }; 3 | }, false); -------------------------------------------------------------------------------- /lsblk/lsblk.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * lsblk - list block devices 3 | 4 | print block devices by their assigned name in a tree format 5 | 6 | #+begin_src sh 7 | lsblk 8 | #+end_src 9 | -------------------------------------------------------------------------------- /macosx/adblock_google_preview.txt: -------------------------------------------------------------------------------- 1 | www.google.co.uk##BUTTON[class="vspib"] 2 | www.google.co.uk##DIV[id="vspb"] 3 | www.google.com##BUTTON[class="vspib"] 4 | www.google.com##DIV[id="vspb"] -------------------------------------------------------------------------------- /macosx/hosts/reload_hosts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ============================ 4 | # = reload macosx /etc/hosts = 5 | # ============================ 6 | 7 | 8 | dscacheutil -flushcache -------------------------------------------------------------------------------- /macosx/mail copy urls.txt: -------------------------------------------------------------------------------- 1 | Stop Pasting Full Names When Copying an Email Address in Mac OS X Mail 2 | 3 | 4 | defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false -------------------------------------------------------------------------------- /macosx/restart_a_filevault_encrypted_system.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # restart a FileVault-encrypted system 4 | # and have it boot back to a working state 5 | 6 | sudo fdesetup authrestart -------------------------------------------------------------------------------- /mplayer/mplayer-headphones.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # mplayer headphones internal speakers 4 | #===================================== 5 | 6 | mplayer -ao alsa:device=plughw=0 video.mp4 7 | -------------------------------------------------------------------------------- /pandoc/html5-base64.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * html5 base64 3 | 4 | #+begin_src sh 5 | pandoc -t html5 --self-contained -s -S --normalize -o outfile.html infile.md 6 | #+end_src 7 | -------------------------------------------------------------------------------- /pandoc/templates-setup.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * copy pandoc templates to home directory 3 | 4 | #+begin_src sh 5 | cp -R /usr/share/pandoc-1.10.1/data ~/.pandoc 6 | #+end_src 7 | 8 | -------------------------------------------------------------------------------- /psad/psad_noemail.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # edit psad.conf and change the ALERTING_METHODS to noemail 4 | sudo vim /etc/psad/psad.conf 5 | 6 | ALERTING_METHODS noemail; 7 | -------------------------------------------------------------------------------- /sed/find-http-links.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * sed find all http links 3 | 4 | #+begin_src sh 5 | sed -n "/href/ s/.*href=['\"]\([^'\"]*\)['\"].*/\1/gp" file.html 6 | #+end_src 7 | -------------------------------------------------------------------------------- /sed/strip-html-tags.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * sed strip html tags - edit original and make backup 3 | 4 | #+begin_src sh 5 | sed -i.bak 's/<[a-zA-Z\/][^>]*>//g' 6 | #+end_src 7 | 8 | -------------------------------------------------------------------------------- /ssl/https-check-if-site-supports-ssl.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * https check if site supports ssl 3 | 4 | #+begin_src sh 5 | openssl s_client -connect www.somesite:443 6 | #+end_src 7 | -------------------------------------------------------------------------------- /v4l-utils/v4l-utils.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | * v4l-utils 3 | 4 | install v4l-utils to get your webcam working 5 | 6 | #+begin_src sh 7 | sudo apt install v4l-utils 8 | #+end_src 9 | -------------------------------------------------------------------------------- /w3m/w3m-variables.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | * w3m show variables 3 | 4 | run the following command inside w3m to show variables 5 | 6 | #+begin_src sh 7 | !env | sort 8 | #+end_src 9 | -------------------------------------------------------------------------------- /bash/yanking-text.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # cut text from the cursor to the begining of the line 4 | # ctrl k 5 | 6 | 7 | # cut text from the cursor to the end of the line 8 | # ctrl u 9 | -------------------------------------------------------------------------------- /ffmpeg/extract-video.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | #+OPTIONS: num:nil author:nil 3 | * extract video 4 | 5 | #+BEGIN_SRC sh 6 | ffmpeg -i infile.mp4 -an -c:v copy outfile.mp4 7 | #+END_SRC 8 | -------------------------------------------------------------------------------- /ffprobe/ffprobe-show-streams.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * ffmpeg show streams, show video info icluding bitrate 3 | 4 | #+begin_src sh 5 | ffprobe -show_streams -i video.mp4 6 | #+end_src 7 | -------------------------------------------------------------------------------- /find/find-change-file-extension.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * change flv file extension to mp4 3 | 4 | #+begin_src sh 5 | find . -name "*.flv" -exec rename s/.flv/.mp4/ {} \; 6 | #+end_src 7 | -------------------------------------------------------------------------------- /git/remove-file-from-being-tracked.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * remove file from being tracked by git , but dont delete it 3 | 4 | #+begin_src sh 5 | git rm --cached filename 6 | #+end_src 7 | -------------------------------------------------------------------------------- /gollum-wiki/server/wiki-sync.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | WIKI_PATH=/var/wiki 4 | GIT=/usr/bin/git 5 | 6 | cd "${WIKI_PATH}" 7 | ${GIT} push 8 | sleep 1 9 | ${GIT} pull 10 | 11 | exit 0 -------------------------------------------------------------------------------- /html/ul_filled_with_links.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ifconfig/ifconfig-wlan.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * ifconfig wlan 3 | 4 | #+begin_src sh 5 | sudo ifconfig wlan0 10.0.0.69 netmask 255.255.255.0 route add default gw 10.0.0.1 6 | #+end_src 7 | -------------------------------------------------------------------------------- /kodi/xsessions/kodi.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Kodi 3 | Comment=This session will start Kodi media center 4 | Exec=kodi-standalone 5 | TryExec=kodi-standalone 6 | Type=Application 7 | -------------------------------------------------------------------------------- /macosx/list_most_used_terminal_commands.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # List Your 15 Most Used Terminal Commands 4 | history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head -15 -------------------------------------------------------------------------------- /mpd/mpd-smb-share.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * nas symlink for mpd 3 | 4 | #+begin_src sh 5 | ln -s /run/user/djwilcox/gvfs/smb-share:server=nas,share=music/flac/ ~/Music/nas 6 | #+end_src 7 | -------------------------------------------------------------------------------- /mplayer/mplayer-play-raw-pcm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # play raw audio with mplayer 4 | mplayer -demuxer rawaudio -rawaudio format=0x20776172 /tmp/mpdfifo -ao pcm -vo null:file=test.wav 5 | 6 | -------------------------------------------------------------------------------- /ncftp/ncftpget.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * ncftp 3 | 4 | #+begin_src sh 5 | ncftpget -R -T -v -u username -p password example.com /home/djwilcox/Desktop/site/ /public_html 6 | #+end_src 7 | -------------------------------------------------------------------------------- /netcat/netcat-google.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * netcat google 3 | 4 | #+begin_src sh 5 | (echo "GET / HTTP/1.0";echo "Host: www.google.com"; echo) | nc www.google.com 80 6 | #+end_src 7 | -------------------------------------------------------------------------------- /sox/sox-fifo-wav.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | # save fifo pipe with sox 5 | sox -t raw -e signed-integer -b 16 -c 2 -r 44100 /tmp/mpdfifo out.wav 6 | 7 | # play 8 | sox -d -p /tmp/mpdfifo 9 | -------------------------------------------------------------------------------- /tr/tr-replace-characters.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * Use the tr command to translate one character to another. 3 | 4 | #+begin_src sh 5 | tr ';' ',' after.txt 6 | #+end_src 7 | -------------------------------------------------------------------------------- /applescript/Save A List of URLs From Your Evernote Items As A File.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/canyon289/cerberus/master/applescript/Save A List of URLs From Your Evernote Items As A File.scpt -------------------------------------------------------------------------------- /arch-linux/android-fastboot-adb-install.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * android fastboot and adb install 3 | 4 | #+begin_src sh 5 | yaourt -S android-sdk-platform-tools android-udev 6 | #+end_src 7 | -------------------------------------------------------------------------------- /awk/print-first-and-second-line.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * awk print first and second lines 3 | 4 | #+begin_src sh 5 | awk 'NR > 1 {print prev, "-", $0}; {prev = $0}' < input 6 | #+end_src 7 | -------------------------------------------------------------------------------- /bash/rename_jpegs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | for i in *.JPG ; do 3 | mv "$i" "$(echo $i | sed 's/\.JPG$/.x/')" 4 | mv "$(echo $i | sed 's/\.JPG$/.x/')" "$(echo $i | sed 's/\.JPG$/.jpg/')" 5 | done -------------------------------------------------------------------------------- /ffmpeg/extarct-audio.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | #+OPTIONS: num:nil author:nil 3 | 4 | * extract audio 5 | 6 | #+BEGIN_SRC sh 7 | ffmpeg -i infile.mp4 -vn -c:a copy outfile.m4a 8 | #+END_SRC 9 | -------------------------------------------------------------------------------- /macosx/directory/directory.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # check if directory exists 4 | 5 | if [ -d "/System/Library/Frameworks" ] ; then 6 | echo "/System/Library/Frameworks is a directory." 7 | fi -------------------------------------------------------------------------------- /mpv/mpv-ytdl.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * mpv ytdl 3 | 4 | play a youtube video using its id by prefix the link with ytdl:// 5 | 6 | #+begin_src sh 7 | mpv ytdl://qYhNJ3itqWw 8 | #+end_src 9 | -------------------------------------------------------------------------------- /nmap/nmap-router-scanning.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # nmap router scanning 4 | 5 | # syn scan 6 | sudo nmap -sS 192.168.1.1 7 | 8 | # os fingerprint scan 9 | sudo nmap -A 192.168.1.1 10 | -------------------------------------------------------------------------------- /psad/psad_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # psad install to work with fwsnort and iptables 4 | sudo apt-get install psad 5 | 6 | # press enter during the install to accept the default options 7 | -------------------------------------------------------------------------------- /sed/find-image-urls-in-html.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * sed get image urls from html file 3 | 4 | #+begin_src sh 5 | sed -n 's/.*>2)) != 0)' -R 'http.request.method == "GET" || http.request.method == "HEAD"' -------------------------------------------------------------------------------- /zsh/zsh-completions-location.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * zsh completions location 3 | 4 | zsh completions location 5 | 6 | #+begin_src sh 7 | /usr/share/zsh/vendor-completions 8 | #+end_src 9 | -------------------------------------------------------------------------------- /andriod/android usb tethering mac.txt: -------------------------------------------------------------------------------- 1 | Android usb tethering mac 2 | 3 | Install HoRNDIS 4 | 5 | http://joshuawise.com/horndis 6 | 7 | 8 | That should create a new network in system preferences network -------------------------------------------------------------------------------- /arch-linux/gpg-pacman-fix.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * pacman gpg fix 3 | 4 | uncomment ~/.gnupg-personal/gpg.conf 5 | 6 | #+begin_src conf 7 | #keyserver-options auto-key-retrieve 8 | #+end_src 9 | -------------------------------------------------------------------------------- /bash/bashrc_default.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # default .bashrc location on linux 4 | 5 | /etc/skel/.bashrc 6 | 7 | # copy default bashrc to home dir 8 | cp /etc/skel/.bashrc ~/.bashrc 9 | 10 | -------------------------------------------------------------------------------- /cups/cups-pdf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # cups-pdf printer 4 | #================= 5 | 6 | # install cups-pdf 7 | sudo apt-get install cups-pdf 8 | 9 | # print a file 10 | lpr -P PDF file 11 | -------------------------------------------------------------------------------- /firefox/firefox-75-config.tx: -------------------------------------------------------------------------------- 1 | browser.urlbar.openViewOnFocus = false 2 | browser.urlbar.update1 = false 3 | browser.urlbar.update1.interventions = false 4 | browser.urlbar.update1. searchTips = false 5 | -------------------------------------------------------------------------------- /freebsd/dbus.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * freebsd dbus 6 | 7 | #+BEGIN_SRC sh 8 | sudo dbus-uuidgen > /etc/machine-id 9 | #+END_SRC 10 | -------------------------------------------------------------------------------- /html/absolute_center_image.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | -------------------------------------------------------------------------------- /macosx/apache/apache_restart_mac_osx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ========================== 4 | # = Apache restart mac osx = 5 | # ========================== 6 | 7 | sudo /usr/sbin/apachectl restart -------------------------------------------------------------------------------- /mysql/mysql-login-bypass.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # mysql injection 4 | SELECT * FROM SOMETABLE WHERE UID = ' ' AND PWD = ' ' 5 | 6 | SELECT * FROM SOMETABLE WHERE UID = ' ' OR 1=1--' AND PWD = ' ' 7 | -------------------------------------------------------------------------------- /ogr2ogr/geojson-to-kml.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * convert geojson to kml 3 | 4 | ogr2ogr convert geojson to kml 5 | 6 | #+begin_src sh 7 | ogr2ogr -f KML output.kml input.geojson 8 | #+end_src 9 | -------------------------------------------------------------------------------- /proxychains/proxychains-setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # proxychains set up 4 | sudo apt-get install proxychains 5 | 6 | # resolve dns with proxyresolv 7 | /usr/lib/proxychains3/proxyresolv example.com 8 | -------------------------------------------------------------------------------- /tr/tr-convert-dos-to-unix.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * tr convert dos to unix 3 | 4 | Convert dos line endings to unix 5 | 6 | #+begin_src sh 7 | tr -d '\r' < input.file > output.file 8 | #+end_src 9 | -------------------------------------------------------------------------------- /ubuntu/gnome-window-always-on-top.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * gnome window always on top 3 | 4 | press alt tab and select always on top, 5 | this will set the window to float above other windows 6 | -------------------------------------------------------------------------------- /xrandr/xprofile: -------------------------------------------------------------------------------- 1 | xrandr --newmode "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync 2 | xrandr --addmode Virtual-0 1368x768_60.00 3 | xrandr --output Virtual-0 --mode 1368x768_60.00 -------------------------------------------------------------------------------- /zsh/zsh-setup.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | * zsh setup 3 | 4 | install zsh and zsh-syntaxt-highlighting 5 | 6 | #+begin_src sh 7 | sudo apt install install zsh zsh-syntax-highlighting 8 | #+end_src 9 | -------------------------------------------------------------------------------- /chmod/chmod-match-file-permissions.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * chmod - change file permissions of a file to be similar of another 3 | 4 | #+begin_src sh 5 | chmod --reference=file1 file2 6 | #+end_src 7 | -------------------------------------------------------------------------------- /css/test_selection_colour.css: -------------------------------------------------------------------------------- 1 | /* Mozilla based browsers */::-moz-selection { background-color: #FFA; color: #000;}/* Works in Safari */::selection { background-color: #FFA; color: #000;} -------------------------------------------------------------------------------- /firefox/picture-in-picture-keyboard.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * firefox picture in picture keyboard shortcut 3 | 4 | toggle picture in picture 5 | 6 | #+begin_example 7 | Ctrl+Shift+] 8 | #+end_example 9 | -------------------------------------------------------------------------------- /kali-linux/mdk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # mdk 4 | 5 | mdk mon0 b -n pwned 6 | 7 | # mon0 = wlan0 in monitor mode 8 | # b = beacon frames 9 | # -n pwned = network bssid to create 10 | 11 | 12 | -------------------------------------------------------------------------------- /rename/rename-to-lowercase.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Convert all files in the current directory to lower case 4 | #========================================================= 5 | 6 | rename 'y/A-Z/a-z/' * 7 | -------------------------------------------------------------------------------- /sed/prepend-domain.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * sed prepend domain to file 3 | 4 | sed prepend domain to text file 5 | 6 | #+begin_src sh 7 | sed -i.bak 's#^#http://example.com#' file.txt 8 | #+end_src 9 | -------------------------------------------------------------------------------- /ssh/ssh-socks5.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * ssh socks5 proxy 3 | 4 | #+begin_src sh 5 | ssh -D 8080 user@server.com 6 | #+end_src 7 | 8 | set proxy switcher in chhrome to 127.0.0.1 port 8080, socks5 9 | -------------------------------------------------------------------------------- /tcpdump/tcpdump-capture-traffic-from-host.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * tcpdump capture traffic from host 3 | 4 | #+begin_src sh 5 | doas tcpdump -s 0 host 192.168.1.4 -i wlan0 -w wlan0.pcap 6 | #+end_src 7 | -------------------------------------------------------------------------------- /bash/if.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | FIRST_ARGUMENT="$1" 4 | if [ "$FIRST_ARGUMENT" = "Silly" ] ; then 5 | echo "Silly human, scripts are for kiddies." 6 | else 7 | echo "Hello, world $FIRST_ARGUMENT!" 8 | fi -------------------------------------------------------------------------------- /bash/uppercase-lowercase-in-terminal.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # change text to upper or lowercase in the terminal 4 | 5 | # make text lowercase 6 | # alt l 7 | 8 | # make text uppercase 9 | # alt u 10 | -------------------------------------------------------------------------------- /cd/cd-last-history-command.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * cd into last directory created in history 3 | 4 | #+begin_src sh 5 | mkdir foo 6 | #+end_src 7 | 8 | #+begin_src sh 9 | cd !$ 10 | #+end_src 11 | -------------------------------------------------------------------------------- /docker/docker-registry/docker-registry-storage/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04 2 | MAINTAINER napoleonwilson 3 | 4 | RUN mkdir -p /home/docker 5 | 6 | VOLUME /home/docker 7 | CMD ["true"] -------------------------------------------------------------------------------- /ffmpeg/change-framerate.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | #+OPTIONS: num:nil author:nil 3 | * ffmpeg change framerate 4 | 5 | #+BEGIN_SRC sh 6 | ffmpeg -i -filter:v fps=fps=30 7 | #+END_SRC 8 | 9 | -------------------------------------------------------------------------------- /freebsd/partition.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * freebsd partition 6 | 7 | freebsd installer partition scheme 8 | for apple hardware choose gpt (bios+uefi) 9 | -------------------------------------------------------------------------------- /html/html5_figure_block.html: -------------------------------------------------------------------------------- 1 |
2 | image 3 | Image Caption 4 | Photo copyright text 5 | 6 |
-------------------------------------------------------------------------------- /irc/weechat.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # weechat irc client install 4 | #=========================== 5 | 6 | sudo add-apt-repository ppa:nesthib/weechat 7 | sudo apt-get update 8 | sudo apt-get install weechat 9 | -------------------------------------------------------------------------------- /kali-linux/cookie.txt: -------------------------------------------------------------------------------- 1 | javascript:alert(document.cookie); 2 | level10_authorized=no; PHPSESSID=nteqr2lhij2luep4b364eh5ui2; style_cookie=null 3 | 4 | javascript:void(document.cookie="level10_authorized=yes"); 5 | -------------------------------------------------------------------------------- /kodi/audio_delay_for_xbmc_airplay.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | # audio delay for xbmc airplay 5 | # 2.100 6 | 7 | # select a video in xbmc click options and change the audio delay to + 2.100 and save as default -------------------------------------------------------------------------------- /libreoffice/libreoffice-debian.md: -------------------------------------------------------------------------------- 1 | # libreoffice debian install 2 | 3 | libreoffice debian install no java 4 | 5 | ``` 6 | sudo apt install --no-install-recommends libreoffice-writer libreoffice-calc 7 | ``` 8 | -------------------------------------------------------------------------------- /lsof/lsof.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # lsof 4 | 5 | lsof -i -n -P | grep dropbox 6 | 7 | # -i = look for ip sockets 8 | # -n = dont resolve dns 9 | # -P = look at ports 10 | 11 | 12 | lsof -Pnl -i4 13 | -------------------------------------------------------------------------------- /lynx/lynx-mplayer.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * lynx mplayer 3 | 4 | #+begin_src sh 5 | lynx --source http://example.com/mp3s | grep "mp3" | cut -d\' -f3 | while read mp3; do mplayer "$mp3"; done 6 | #+end_src 7 | -------------------------------------------------------------------------------- /macosx/Mac_osx_tcpdump.txt: -------------------------------------------------------------------------------- 1 | Mac osx tcpdump 2 | 3 | 4 | tcpdump must be run as root 5 | 6 | sudo su 7 | 8 | enter password press return 9 | 10 | tcpdump -n 11 | 12 | 13 | 14 | tcpdump –Xx –s 500 –n -------------------------------------------------------------------------------- /macosx/textmate/textmate_export_theme_as_css.txt: -------------------------------------------------------------------------------- 1 | textmate export theme as css 2 | 3 | 4 | select the bundles menu 5 | 6 | then select the textmate bundle 7 | 8 | 9 | then select - create css from current theme -------------------------------------------------------------------------------- /sort/sort-remove-duplicates.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * sort remove duplicates 3 | 4 | instead of piping sort into uniq use the -u option 5 | 6 | #+begin_src sh 7 | sort -u file1 file2 > file3 8 | #+end_src 9 | -------------------------------------------------------------------------------- /ssh/regenerate-a-public-ssh-key-using-a-private-key.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * REGENERATE A PUBLIC SSH-KEY USING PRIVATE SSH-KEY 3 | 4 | #+begin_src sh 5 | ssh-keygen -y -f id_rsa > id_rsa.pub 6 | #+end_src 7 | -------------------------------------------------------------------------------- /wireshark/openbsd-wireshark-non-root.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # add your user to the _wireshark group 4 | # so you dont use wireshark as root 5 | 6 | sudo usermod -G _wireshark username 7 | 8 | # re login 9 | -------------------------------------------------------------------------------- /andriod/android backup.sh: -------------------------------------------------------------------------------- 1 | # android back up 2 | 3 | # back up 4 | adb backup -apk -shared -all -f /home/$USER/Desktop/backup.ab 5 | 6 | # restore 7 | adb restore /home/$USER/Desktop/backup.ab 8 | 9 | 10 | -------------------------------------------------------------------------------- /arch-linux/gparted-arch.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * gparted install 3 | 4 | #+begin_src sh 5 | sudo pacman -S gparted exfat-utils ntfs-3g gpart mtools f2fs-tools 6 | #+end_src 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /blender/blender-cuda-nvidia.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * blender cuda nvidia 3 | 4 | install the nvidia-cuda-toolkit 5 | 6 | #+begin_src sh 7 | sudo apt install nvidia-cuda-toolkit nvidia-modprobe 8 | #+end_src 9 | -------------------------------------------------------------------------------- /ffmpeg/scale-pad.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | #+OPTIONS: num:nil author:nil 3 | 4 | * scale and pad 5 | 6 | #+BEGIN_SRC sh 7 | ffmpeg -i fps.mp4 -vf "scale=-1:1080,pad=1920:ih:(ow-iw)/2" outfile.mp4 8 | #+END_SRC 9 | -------------------------------------------------------------------------------- /freebsd/bluetooth-stop.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * blue freebsd stop 6 | 7 | #+BEGIN_SRC sh 8 | sudo service bluetooth onestop ubt0 9 | #+END_SRC 10 | -------------------------------------------------------------------------------- /fzf/fzf-list.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | * fzf 3 | 4 | echo in url and link 5 | 6 | #+begin_src sh 7 | echo -e 'url title' | fzf --delimiter=' ' --with-nth=2 | cut -d" " -f1 8 | #+end_src 9 | 10 | 11 | -------------------------------------------------------------------------------- /html/sticky_footer.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 |
6 | 7 |
8 | -------------------------------------------------------------------------------- /libvirt/setfacl-libvirt.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * set acl for libvirt 3 | 4 | #+begin_src sh 5 | setfacl -m "u:nobody:--x" /home/djwilcox 6 | getfacl /home/djwilcox 7 | chmod o-rx /home/djwilcox 8 | #+end_src 9 | -------------------------------------------------------------------------------- /ls/ls-arguments.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * ls arguments 3 | 4 | #+begin_src sh 5 | ls -l $(which cp) 6 | #+end_src 7 | 8 | * old school 9 | 10 | #+begin_src sh 11 | ls -l `which cp` 12 | #+end_src 13 | -------------------------------------------------------------------------------- /pandoc/markdown-raw-html.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * pandoc markdown strip html 3 | 4 | #+begin_src sh 5 | pandoc -f html -t markdown-raw_html -S --normalize --atx-headers -o infile.html outfile.md 6 | #+end_src 7 | -------------------------------------------------------------------------------- /raspberry-pi/kill_pulseaudio.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # clean pulseaudio config properly: 4 | 5 | sudo killall -9 pulseaudio 6 | 7 | rm -rf ~/.pulse* 8 | 9 | rm -rf /tmp/pulse* 10 | 11 | pulseaudio --start -------------------------------------------------------------------------------- /vlc/vlc-lua.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | * vlc lua script location 3 | 4 | create the lua playlist directory in your home directory 5 | 6 | #+begin_src sh 7 | mkdir -p ~/.local/share/vlc/lua/playlist 8 | #+end_src 9 | -------------------------------------------------------------------------------- /bash/file-extension: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | [[ $# -eq 1 ]] || exit 4 | 5 | file="$1" 6 | filename="${file%%.*}" 7 | extension="${file#*.}" 8 | 9 | printf "%s\n%s\n" "filename: $filename" "extension: $extension" 10 | -------------------------------------------------------------------------------- /chromium-browser/chrome-force-ssl-for-domain.txt: -------------------------------------------------------------------------------- 1 | # force ssl for a domain 2 | 3 | open chrome and go to this url 4 | 5 | chrome://net-internals/#hsts 6 | 7 | then add a domain without the http and www and click add 8 | -------------------------------------------------------------------------------- /dig/dig.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * dig 3 | 4 | #+begin_src sh 5 | dig mx hak5.org 6 | #+end_src 7 | 8 | ** zone transfer 9 | 10 | #+begin_src sh 11 | dig -t AXFR hak6.org @ns1.zoneedit.com 12 | #+end_src 13 | -------------------------------------------------------------------------------- /emacs/emacs-capture-protocol/emacs-capture.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Emacs Client 3 | Exec=emacs-capture %u 4 | Icon=emacs-icon 5 | Type=Application 6 | Terminal=false 7 | MimeType=x-scheme-handler/org-protocol; 8 | -------------------------------------------------------------------------------- /emacs/emacs-capture-protocol/org-protocol.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=org-protocol 3 | Exec=emacsclient %u 4 | Type=Application 5 | Terminal=false 6 | Categories=System; 7 | MimeType=x-scheme-handler/org-protocol; 8 | -------------------------------------------------------------------------------- /ffmpeg/colour-to-grayscale.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil author:nil 3 | 4 | * colour to grayscale 5 | 6 | #+BEGIN_SRC sh 7 | ffmpeg -i infile.mp4 -vf hue=s=0 outfile.mp4 8 | #+END_SRC 9 | 10 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-copy.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * ffmpeg copy 6 | 7 | #+BEGIN_SRC sh 8 | ffmpeg -i infile.flv -c:v copy -c:a copy outfile.mp4 9 | #+END_SRC 10 | -------------------------------------------------------------------------------- /gollum-wiki/server/users.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - - John Doe 3 | - johndoe@gmail.com 4 | - b48cf0140bea12734db05ebcdb012f1d265bed84 5 | - - Jane Doe 6 | - janedoe@gmail.com 7 | - 6adc006e6f6af9b1082805a27826971537f11c58 8 | -------------------------------------------------------------------------------- /grep/grep-files-for-links-to-jpgs.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * grep files for links to .jpg files 3 | 4 | #+begin_src sh 5 | grep --exclude-dir=./.git -Hrni ".jpg)" gollum | tee ~/Desktop/jpg-results.txt 6 | #+end_src 7 | -------------------------------------------------------------------------------- /nixpkgs/mac-nixpkgs.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | * mac nixpkgs install 3 | 4 | #+begin_src sh 5 | sh <(curl -L https://nixos.org/nix/install) \ 6 | --darwin-use-unencrypted-nix-store-volume \ 7 | --daemon 8 | #+end_src 9 | -------------------------------------------------------------------------------- /openssl/openssl-htpasswd.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * replace user with username and password with real password 3 | 4 | #+begin_src sh 5 | printf "USER:$(openssl passwd -crypt PASSWORD)\n" >> .htpasswd 6 | #+end_src 7 | -------------------------------------------------------------------------------- /pandoc/metadata-yaml.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * markdown to pdf with metadata yaml file 3 | 4 | #+begin_src sh 5 | pandoc --self-contained -s -S --normalize --toc metadata.yaml -o outfile.pdf infile.md 6 | #+end_src 7 | -------------------------------------------------------------------------------- /rsync/rsync-system-backup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # rsync system backup 4 | #==================== 5 | 6 | rsync -aAXv /* /path/to/backup/folder --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found} 7 | -------------------------------------------------------------------------------- /sox/sox.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Stream system sounds over rtmp 4 | #=============================== 5 | 6 | sox -d -p | ffmpeg -i pipe:0 -f flv -preset ultrafast -tune zerolatency rtmp://localhost/live/livestream 7 | -------------------------------------------------------------------------------- /squid/squid-block-ip-address.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # block ip address with squid 4 | #============================ 5 | 6 | acl IPForHostname dstdom_regex ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ 7 | http_access deny IPForHostname -------------------------------------------------------------------------------- /ubuntu/xdg-desktop-portal-gnome.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * xdg-desktop-portal-gnome 3 | 4 | xdg-desktop-portal-gnome for obs studio 5 | 6 | #+begin_src sh 7 | doas apt install xdg-desktop-portal-gnome 8 | #+end_src 9 | -------------------------------------------------------------------------------- /css/html5_display_block.css: -------------------------------------------------------------------------------- 1 | 2 | /*html5 css------------------ html5 css ------------------------------------*/ 3 | 4 | article, aside, dialog, figure, footer, header, hgroup, menu, nav, section { 5 | display: block; 6 | } -------------------------------------------------------------------------------- /docker/apache/apache-docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # docker apache image link to local filesystem 4 | 5 | docker run -d -p 80:80 --name apache -v /home/djwilcox/Documents/work/apache/:/usr/local/apache2/htdocs/ httpd:2.4 6 | -------------------------------------------------------------------------------- /emacs/display-line-numbers.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * display line numbers in emacs 3 | 4 | press meta x and then type display-line-numbers-mode 5 | 6 | #+begin_example 7 | M-x display-line-numbers-mode 8 | #+end_example 9 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg_thumbsmov.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for i in *.mov; do ffmpeg -an -ss 00:00:10 -vframes 1 -y -i "$i" -f image2 -s 128x96 "`echo $i |sed 's/.mov$/.jpg/'`" ;done 4 | growlnotify -m "Thumbnails created from mov's" FFMPEG -------------------------------------------------------------------------------- /macosx/lion/Lion wif file transfer fix.txt: -------------------------------------------------------------------------------- 1 | I've been plagued by painfully slow wireless file transfers since updating to 10.5.2. 2 | 3 | I changed the channel on the wireless router to 8 and have found it solved the problem. -------------------------------------------------------------------------------- /pandoc/pandoc-webclipper/pandoc-protocol.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=pandoc-protocol 3 | Exec=web-clipper %u 4 | Type=Application 5 | Terminal=false 6 | Categories=System; 7 | MimeType=x-scheme-handler/pandoc-protocol; 8 | -------------------------------------------------------------------------------- /rsync/rsync-backup-script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # rsync system backup 4 | #==================== 5 | 6 | sudo rsync -aAXv /* /media/djwilcox/usb --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found} 7 | -------------------------------------------------------------------------------- /stdin/stdin-echo-argument-from-cat.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # store cat in a variable and then echo it 4 | #========================================= 5 | 6 | ARG=$(cat ~/Desktop/index.html) 7 | 8 | echo $ARG 9 | 10 | -------------------------------------------------------------------------------- /surfraw/surfraw.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: overview 2 | * surfraw install 3 | 4 | install surfraw without a load of dependencies 5 | 6 | #+begin_src sh 7 | sudo apt install --no-install-recommends surfraw 8 | #+end_src 9 | 10 | -------------------------------------------------------------------------------- /sxhkd/reload-sxhkd.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * sxhkd reload 3 | 4 | If sxhkd receives a SIGUSR1 (resp. SIGUSR2) signal, it will reload its configuration file 5 | 6 | #+begin_src sh 7 | pkill -usr1 -x sxhkd 8 | #+end_src 9 | -------------------------------------------------------------------------------- /tail/tail_show_lines.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # tail show last 10 lines of file by default 4 | 5 | # tail -number to show number of lines 6 | # tail -2 file.txt 7 | 8 | # show last 3 lines from top of a file 9 | tail -3 file.txt -------------------------------------------------------------------------------- /tree/tree.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # tree install 4 | #============= 5 | 6 | sudo apt-get install tree 7 | 8 | # only show directories 9 | tree -d directory 10 | 11 | # show hidden files 12 | tree -a directory 13 | -------------------------------------------------------------------------------- /at/at.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * at 3 | 4 | #+begin_src sh 5 | sudo apt install at 6 | #+end_src 7 | 8 | start atd before using the at command 9 | 10 | #+begin_src sh 11 | sudo systemctl start atd 12 | #+end_src 13 | -------------------------------------------------------------------------------- /dos2unix/dos2unix-convert-lin-ending-to-unix.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * dos2unix - convert line ending to unix 3 | 4 | #+begin_src sh 5 | find . -type f -regex ".*\.\(htm\|html\)$" \ 6 | -exec dos2unix '{}' \; 7 | #+end_src 8 | -------------------------------------------------------------------------------- /freebsd/list-disks.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * Freebsd list disks 6 | 7 | Freebsd list connected disks 8 | 9 | #+BEGIN_SRC sh 10 | geom disk list 11 | #+END_SRC 12 | -------------------------------------------------------------------------------- /freebsd/pf-reload.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * reload pf firewall 6 | 7 | reload pf 8 | 9 | #+BEGIN_SRC sh 10 | sudo pfctl -f /etc/pf.conf 11 | #+END_SRC 12 | 13 | -------------------------------------------------------------------------------- /get-iplayer/get-iplayer-record-live-tv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # get-iplayer record live tv 4 | #=========================== 5 | 6 | # change BBC One to record a different channel 7 | get_iplayer --type=livetv --get "BBC One" 8 | -------------------------------------------------------------------------------- /homebrew/homebrew-appdir.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * homebrew cask appdir 3 | 4 | homebrew install gui apps in ~/Application 5 | 6 | #+begin_src sh 7 | brew cask install --appdir="~/Applications" retroarch-metal 8 | #+end_src 9 | -------------------------------------------------------------------------------- /html/html5_aside.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /imagemagick/convert.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * use imagemagik to resize and pad images 3 | 4 | #+begin_src sh 5 | convert poster.png -resize 320x180 -background black -gravity center -extent 320x180 out.poster 6 | #+end_src 7 | -------------------------------------------------------------------------------- /macosx/show_os_version_from_command_line_(mac).sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # =========================================== 4 | # = show os version from command line (mac) = 5 | # =========================================== 6 | 7 | sw_vers -------------------------------------------------------------------------------- /mplayer/mplayer-internal-speakers-usb-audio.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # use internal speakers for audio 4 | mplayer -ao alsa:device=hw=0.0 video.avi 5 | 6 | # use usb audio for audio 7 | mplayer -ao alsa:device=plughw=1 video.avi 8 | -------------------------------------------------------------------------------- /openbsd/pf-firewall-allow-ssh.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # /etc/pf.conf 4 | #=============== 5 | 6 | 7 | sudo vim /etc/pf.conf 8 | 9 | # allow ssh traffic 10 | pass in inet proto tcp to port ssh 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /perl/perl-command-line.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # run perl from the command line 4 | perl -e 'print "hello world\n";' 5 | 6 | # -e option, the next argument is a perl statement 7 | # enclose the command in single quotes '' 8 | -------------------------------------------------------------------------------- /sed/remove-md-extension.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * sed remove .md file extension from links for gollum wiki 3 | 4 | #+begin_src sh 5 | find . -type f -regex ".*\.\(md\)$" -exec sed -i 's/\.\(md\)//g' '{}' \; 6 | #+end_src 7 | 8 | -------------------------------------------------------------------------------- /sed/wrap-string-in-quotes.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * sed add double quotes around string 3 | 4 | add double quotes to the start and end of the text 5 | 6 | #+begin_src sh 7 | sed -i.bak 's/^/"/;s/$/"/' input.csv 8 | #+end_src 9 | -------------------------------------------------------------------------------- /subversion/svn_reverting.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # =========================================== 4 | # = subversion revert to a previous version = 5 | # =========================================== 6 | 7 | 8 | svn merge -rHEAD:123 . -------------------------------------------------------------------------------- /synology/synology restart ssh.sh: -------------------------------------------------------------------------------- 1 | # synology restart ssh 2 | 3 | # restart ssh via command line 4 | # you can also use the nas web gui 5 | 6 | # enable telnet, then telnet into the nas 7 | 8 | /usr/syno/etc/rc.d/S95sshd.sh restart -------------------------------------------------------------------------------- /xargs/xargs-create-directorys.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil author:nil 3 | 4 | * xargs create driectories from text file 5 | 6 | #+BEGIN_SRC sh 7 | xargs -I {} mkdir -p "{}" < mydirectories.txt 8 | #+END_SRC 9 | -------------------------------------------------------------------------------- /xrandr/xrandr-toggle-hdmi.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # hdmi on 4 | xrandr --output eDP1 --auto --primary --output HDMI1 --auto --right-of eDP1 5 | 6 | # hdmi off 7 | xrandr --output eDP1 --auto --primary --output HDMI1 --off 8 | 9 | -------------------------------------------------------------------------------- /chromium-browser/chromium-flash-player-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # install the flash player package 4 | sudo apt-get install pepperflashplugin-nonfree 5 | 6 | # install flash 7 | sudo update-pepperflashplugin-nonfree --install 8 | -------------------------------------------------------------------------------- /chromium-browser/scriptsafe-evernote.txt: -------------------------------------------------------------------------------- 1 | # set scriptsafe chrome extension to work with the evernote clipper 2 | 3 | 1 - add evernote.com as a whitelisted domain 4 | 5 | 2 - allow the evernote clipper by check Respect Same-Domain: 6 | -------------------------------------------------------------------------------- /ffmpeg/crop-pad.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil author:nil 3 | 4 | * crop and pad 5 | 6 | #+BEGIN_SRC sh 7 | ffmpeg -i infile.mp4 -filter:v "crop=1440:1080:240:0,hue=s=0,pad=1920:ih:(ow-iw)/2" outfile.mp4 8 | #+END_SRC 9 | -------------------------------------------------------------------------------- /ffmpeg/dump-audio-from-video.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * ffmpeg dump audio from video 6 | 7 | #+BEGIN_SRC sh 8 | ffmpeg -i video.mov -f aiff audio.aiff 9 | #+END_SRC 10 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-scale.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * scale videos with ffmpeg 6 | 7 | #+BEGIN_SRC sh 8 | ffmpeg -i input.mp4 -vf scale=480:-1 output_480.mp4 9 | #END_SRC 10 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg_thumbsmp4.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for i in *.mp4; do ffmpeg -an -ss 00:00:10 -vframes 1 -y -i "$i" -f image2 -s 128x96 "`echo $i |sed 's/.mp4$/.jpg/'`" ;done 4 | growlnotify -m "Thumbnails created from mp4's" FFMPEG 5 | -------------------------------------------------------------------------------- /find/find-symlinks.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * find symlinks in home directory 3 | 4 | find symlinks in your home directory and where they point to 5 | 6 | #+begin_src sh 7 | find $HOME -type l -ls | awk '{print $NF}' 8 | #+end_src 9 | -------------------------------------------------------------------------------- /freebsd/emacs-freebsd.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * emacs freebsd 6 | 7 | install emacs-devel 8 | 9 | #+BEGIN_SRC sh 10 | sudo pkg install emacs-devel 11 | #+END_SRC 12 | -------------------------------------------------------------------------------- /freebsd/pkg-autoremove.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * pkg autoremove 6 | 7 | remove unused dependencies 8 | 9 | #+BEGIN_SRC sh 10 | sudo pkg autoremove 11 | #+END_SRC 12 | -------------------------------------------------------------------------------- /freebsd/sxiv.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * freebsd sxiv image viewer 6 | 7 | install sxiv image viewer 8 | 9 | #+BEGIN_SRC sh 10 | sudo pkg install sxiv 11 | #+END_SRC 12 | -------------------------------------------------------------------------------- /freebsd/vlc3.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * vlc3 on freebsd 6 | 7 | install new version of vlc on freebsd 8 | 9 | #+BEGIN_SRC sh 10 | sudo pkg install vlc3 11 | #+END_SRC 12 | -------------------------------------------------------------------------------- /html/html5_article.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Title

4 |
5 |
6 |
7 |
8 |
-------------------------------------------------------------------------------- /ip/list-network-devices.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | * list network devices 3 | ** ip link 4 | 5 | #+begin_src sh 6 | ip link 7 | #+end_src 8 | 9 | ** ls sys 10 | 11 | #+begin_src sh 12 | ls /sys/class/net 13 | #+end_src 14 | -------------------------------------------------------------------------------- /libvirt/libvirt.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * libvirt 3 | 4 | #+begin_src sh 5 | sudo apt-get install qemu-kvm libvirt-bin bridge-utils virt-manager 6 | mkdir -p libvirtd/images 7 | sudo chown -R djwilcox:kvm libvirtd/ 8 | #+end_src 9 | -------------------------------------------------------------------------------- /macosx/directory/directory_check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | directory="./BashScripting" 3 | 4 | # bash check if directory exists 5 | if [ -d $directory ]; then 6 | echo "Directory exists" 7 | else 8 | echo "Directory does not exists" 9 | fi -------------------------------------------------------------------------------- /markdown/retext-markdown-editor-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # retext mardown editor install 4 | #============================== 5 | 6 | sudo add-apt-repository ppa:mitya57 7 | sudo apt-get update 8 | sudo apt-get install retext 9 | -------------------------------------------------------------------------------- /mosh/mosh autocomplete ssh hosh names.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # mosh autocomplete ssh hosh names 4 | 5 | # edit .bash_profile and add these 2 commands at the bottom 6 | 7 | ssh_complete=$(complete -p ssh) 8 | eval "$ssh_complete mosh" -------------------------------------------------------------------------------- /python/pip-uninstall-install.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * pip uninstall package 3 | 4 | #+begin_src sh 5 | pip uninstall pilfer 6 | #+end_src 7 | 8 | #+begin_src sh 9 | pip3 install --user ~/Desktop/pilfer 10 | #+end_src 11 | -------------------------------------------------------------------------------- /shnsplit/shnsplit.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * split flac audio file into clips 3 | 4 | replace file.cue and file.flac with your file names 5 | 6 | #+begin_src sh 7 | shnsplit -f file.cue -t "%n %t" -o flac file.flac 8 | #+end_src 9 | -------------------------------------------------------------------------------- /synology/find-and-remove-eadir-directories.sh: -------------------------------------------------------------------------------- 1 | find . -name "@eaDir" -type d -print |while read FILENAME; do echo "${FILENAME}"; done 2 | 3 | 4 | find . -name "@eaDir" -type d -print |while read FILENAME; do rm -rf "${FILENAME}"; done -------------------------------------------------------------------------------- /xcode/super_init.m: -------------------------------------------------------------------------------- 1 | // super init 2 | - (id)init 3 | { 4 | self = [super init]; 5 | 6 | if (self != nil) 7 | { 8 | // code goes here 9 | 10 | } 11 | 12 | return self; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /bash/getting_timestamp_into_bash_script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ====================================== 4 | # = getting timestamp into bash script = 5 | # ====================================== 6 | 7 | NOW=$(date +'%m.%d.%y at %H:%M:%S') -------------------------------------------------------------------------------- /bash/pngcrush_for_compressing_images.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # =================================== 4 | # = pngcrush for compressing images = 5 | # =================================== 6 | 7 | pngcrush -rem alla -brute -reduce in.png out.png -------------------------------------------------------------------------------- /curl/curl-download-a-series-of-urls.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * curl download a series of urls 3 | 4 | Allows downloading of sequential files 5 | 6 | #+begin_src sh 7 | curl -O http://www.somesite.com/photo_[001-722].jpg 8 | #+end_src 9 | -------------------------------------------------------------------------------- /ffmpeg/extract-audio.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | #+OPTIONS: num:nil author:nil 3 | * extract audio with ffmpeg 4 | 5 | ffmpeg extract audio 6 | 7 | #+BEGIN_SRC sh 8 | ffmpeg -i infile.mp4 -vn -c:a copy outfile.m4a 9 | #+END_SRC 10 | -------------------------------------------------------------------------------- /ffmpeg/raw-audio.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * Extract raw audio from video 6 | 7 | #+BEGIN_SRC sh 8 | ffmpeg -i source.mpg -f s16le -acodec pcm_s16le audio.raw 9 | #+END_SRC 10 | -------------------------------------------------------------------------------- /find/find-files-mkdir-mv-files.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * find files make directory move files into directory 3 | 4 | #+begin_src sh 5 | find . -type f -print0 | xargs -0 -l sh -c 'mkdir "${1%.*}" && mv "$1" "${1%.*}"' sh 6 | #+end_src 7 | -------------------------------------------------------------------------------- /gpsbabel/gpx-track-speed.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * gpx track speed 3 | 4 | add speed to a gpx track 5 | 6 | #+begin_src sh 7 | gpsbabel -t -i gpx -f input.gpx -x track,speed -o gpx,gpxver=1.0 -F output.gpx 8 | #+end_src 9 | 10 | -------------------------------------------------------------------------------- /grep/grep-files-for-links.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * grep files for directory in link 3 | 4 | grep for link to file 5 | 6 | #+begin_src sh 7 | grep --exclude-dir=./.git -Hrni "/CS/" gollum | tee ~/Desktop/cs-results.txt 8 | #+end_src 9 | -------------------------------------------------------------------------------- /openbsd/pf.conf: -------------------------------------------------------------------------------- 1 | set block-policy drop 2 | set skip on lo0 3 | match in all scrub (no-df) 4 | antispoof quick for (egress) 5 | block in quick on egress from { no-route urpf-failed } to any 6 | block in all 7 | pass out quick inet keep state 8 | -------------------------------------------------------------------------------- /proxychains/proxychains-arch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # proxychains arch linux 4 | #======================= 5 | 6 | sudo pacman -S proxychains-ng 7 | 8 | 9 | # edit proxychains.conf 10 | 11 | sudo vim /etc/proxychains.conf 12 | -------------------------------------------------------------------------------- /ubuntu/set-default-terminal.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * Set default Terminal 3 | 4 | #+begin_src sh 5 | sudo update-alternatives --config x-terminal-emulator 6 | #+end_src 7 | 8 | Just type in the number of the selection and hit enter. 9 | -------------------------------------------------------------------------------- /bash/bash_script_template.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ======================== 4 | # = bash script template = 5 | # ======================== 6 | 7 | touch test.sh 8 | echo '#!/bin/sh' > test.sh 9 | chmod +x test.sh 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /css/absolute_center_image.css: -------------------------------------------------------------------------------- 1 | html, body, #wrapper { 2 | height:100%; 3 | width: 100%; 4 | margin: 0; 5 | padding: 0; 6 | border: 0; 7 | } 8 | #wrapper td { 9 | vertical-align: middle; 10 | text-align: center; 11 | } -------------------------------------------------------------------------------- /css/absolute_center_image_3.css: -------------------------------------------------------------------------------- 1 | img { 2 | position: absolute; 3 | top: 50%; 4 | left: 50%; 5 | width: 500px; 6 | height: 500px; 7 | margin-top: -250px; /* Half the height */ 8 | margin-left: -250px; /* Half the width */ 9 | } -------------------------------------------------------------------------------- /freebsd/fix-mbr.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * freebsd fix mbr 6 | 7 | where device is the boot disk 8 | 9 | #+BEGIN_SRC sh 10 | sudo fdisk -B -b /boot/boot0 device 11 | #+END_SRC 12 | -------------------------------------------------------------------------------- /freebsd/pkg-info-list.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * pkg info list 6 | 7 | pkg info list installed files from package 8 | 9 | #+BEGIN_SRC sh 10 | pkg info -l ffmpeg 11 | #+END_SRC 12 | -------------------------------------------------------------------------------- /git/exclude: -------------------------------------------------------------------------------- 1 | /* 2 | !/.bash_profile 3 | !/.bash_aliases 4 | !/.git-completion.bash 5 | !/.git-prompt.sh 6 | !/.gitconfig 7 | !/.gitignore-global 8 | !/.inputrc 9 | !/.mplayer 10 | !/.tm_properties 11 | !/.vimrc 12 | !/.vim 13 | 14 | 15 | -------------------------------------------------------------------------------- /grep/remove-comments.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * grep remove # and white space 3 | 4 | use to reduce the size of squid.conf from 5000 lines to 40 lines 5 | 6 | #+begin_src sh 7 | grep -ve ^# -ve ^$ squid.conf > squid-grep.conf 8 | #+end_src 9 | -------------------------------------------------------------------------------- /javascript/ipad prevent default scroll.js: -------------------------------------------------------------------------------- 1 | if ( (navigator.userAgent.indexOf('iPad') != -1)) { 2 | document.addEventListener('DOMContentLoaded', function() { 3 | document.ontouchmove = function(e){ e.preventDefault(); }; 4 | }, false); 5 | } -------------------------------------------------------------------------------- /macosx/ngrep_install_macosx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ngrep install on mac 4 | 5 | # download http://ngrep.sourceforge.net/ 6 | 7 | # configure 8 | ./configure --with-pcap-includes=/usr/include 9 | 10 | # make 11 | # sudo make install -------------------------------------------------------------------------------- /php/file.php: -------------------------------------------------------------------------------- 1 | "; 7 | } 8 | fclose($file); 9 | ?> -------------------------------------------------------------------------------- /sed/sed-tips.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * remove text big 3 | 4 | #+begin_src sh 5 | sed -e 's/b[^g]*g//g' big.txt 6 | #+end_src 7 | 8 | * remove html tags 9 | 10 | #+begin_src sh 11 | sed -e 's/<[^>]*>//g' test.html 12 | #+end_src 13 | -------------------------------------------------------------------------------- /subversion/subversionProject.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ============================= 4 | # = Create Subversion Project = 5 | # ============================= 6 | 7 | mkdir -p ~/Desktop/project/trunk ~/Desktop/project/branches ~/Desktop/project/tags -------------------------------------------------------------------------------- /wireshark/wireshark-rtmp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # sniff urls with wireshark 4 | #========================== 5 | 6 | # start wireshark as root 7 | 8 | gksudo wireshark & 9 | 10 | # add a filter for rtmp traffic 11 | 12 | rtmpt 13 | -------------------------------------------------------------------------------- /arpspoof/arp_spoof_mitm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | # arp spoof - man in the middle 5 | 6 | arpspoof -i wlan0 -t 192.168.1.9 192.168.1.1 7 | 8 | # -i wlan0 = interface 9 | # -t 192.168.1.9 = target ip address 10 | # 192.168.1.1 = router 11 | -------------------------------------------------------------------------------- /bash/check-if-script-was-run-as-root.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # check to see if script was run as root 4 | #======================================= 5 | 6 | if [[ $UID -ne 0 ]]; then 7 | echo "$0 must be run as root" 8 | exit 1 9 | fi 10 | -------------------------------------------------------------------------------- /ffmpeg/dump-audio-stream-from-video.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * dump audio stream from a video file 6 | 7 | #+BEGIN_SRC sh 8 | ffmpeg -i "$1" -map 0:1 -c copy "$1".m4a 9 | #+END_SRC 10 | -------------------------------------------------------------------------------- /ffmpeg/dump-audio-with-map.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * dump audio stream from a video file 6 | 7 | #+BEGIN_SRC sh 8 | ffmpeg -i infile.mp4 -map 0:1 -c copy outf‎ile.m4a 9 | #+END_SRC 10 | -------------------------------------------------------------------------------- /find/find-file-and-cat.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * find file and cat contents of another file into it 3 | 4 | #+begin_src sh 5 | find . -type f | 6 | while read file 7 | do 8 | cat ~/Desktop/index.html > "$file" 9 | done 10 | #+end_src 11 | -------------------------------------------------------------------------------- /freebsd/emacs-devel.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * freebsd emacs 6 | 7 | install the lastest version of emacs 8 | 9 | #+BEGIN_SRC sh 10 | sudo pkg install emacs-devel 11 | #+END_SRC 12 | -------------------------------------------------------------------------------- /lynx/lynx-dump-links.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * lynx dump listonly 3 | 4 | #+begin_src sh 5 | lynx \ 6 | -dump -listonly -nonumbers \ 7 | -nomargins -width=120 \ 8 | "url" \ 9 | > lynx-$(date +"%Y-%m-%d-%H-%M-%S").txt 10 | #+end_src 11 | -------------------------------------------------------------------------------- /m3u8/start-stop.m3u8: -------------------------------------------------------------------------------- 1 | #EXTM3U 2 | 3 | #EXTINF:0, 01-firstvideo 4 | #EXTVLCOPT:start-time=6 5 | #EXTVLCOPT:stop-time=36 6 | video1.mp4 7 | 8 | #EXTINF:0, 02-secondvideo 9 | #EXTVLCOPT:start-time=118 10 | #EXTVLCOPT:stop-time=145 11 | video2.mp4 -------------------------------------------------------------------------------- /macosx/check_if_mac_is_64_bit.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #-----------------------------------------------# 4 | # check if mac is 64 bit 5 | #-----------------------------------------------# 6 | 7 | uname -m 8 | # x86_64 9 | 10 | arch 11 | # i386 -------------------------------------------------------------------------------- /macosx/mac_osx_open_command.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ================================================ 4 | # = open file with application from the terminal = 5 | # ================================================ 6 | 7 | open -a Pages somefile.rtfd 8 | -------------------------------------------------------------------------------- /meld/meld-over-ssh.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * Using meld to compare directories over ssh 3 | 4 | Set up a ssh public private key and copy to your server 5 | 6 | #+begin_src sh 7 | meld <(ssh 192.168.1.2 ls Desktop) <(ls Desktop) 8 | #+end_src 9 | -------------------------------------------------------------------------------- /openbsd/python-pip-openbsd-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # install python pip 4 | #=================== 5 | 6 | sudo pkg_add -i py-pip 7 | 8 | 9 | # create symlik for pip 10 | 11 | sudo ln -sf /usr/local/bin/pip-2.7 /usr/local/bin/pip 12 | -------------------------------------------------------------------------------- /pandoc/parse-raw-html.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * pandoc parse raw html - dont strip html elements 3 | 4 | #+begin_src sh 5 | find . -type f -regex ".*\.\(htm\|html\)$" -exec pandoc -f html -t markdown --parse-raw -o '{}' '{}' \; 6 | #+end_src 7 | -------------------------------------------------------------------------------- /subversion/subversion_repo_on_an_external_hard_drive.txt: -------------------------------------------------------------------------------- 1 | subversion repo on an external hard drive 2 | 3 | 4 | 1 - do a get info on the hard dive 5 | 6 | 2 - uncheck - ignore ownership on this volume 7 | 8 | proceed as a normal subversion repo set up -------------------------------------------------------------------------------- /youtube-dl/youtube-dl-best.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * youtube-dl best setting download 3 | 4 | youtube-dl download best quality at 1920 x 1080 5 | 6 | #+begin_src sh 7 | youtube-dl -f 'best[width<=1920,height<=1080]' url-goes-here 8 | #+end_src 9 | -------------------------------------------------------------------------------- /bash/Show_only_hidden_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ============================================ 4 | # = Show only hidden files starting with dot = 5 | # ============================================ 6 | 7 | ls -d .* 8 | 9 | ls -d .[!.]* 10 | -------------------------------------------------------------------------------- /curl/curl-time-to-first-byte.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * curl time to first byte 3 | 4 | #+begin_src sh 5 | curl -o /dev/null -w "Connect: %{time_connect} TTFB: %{time_starttransfer} Total time: %{time_total} \n" http://inserturl.here 6 | #+end_src 7 | -------------------------------------------------------------------------------- /curl/id-a-web-server.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * Two quick and dirty ways to ID a web server. 3 | 4 | #+begin_src sh 5 | curl -I www.hak5.org 6 | #+end_src 7 | 8 | #+begin_src sh 9 | telnet www.hak5.org 80 10 | HEAD / HTTP/1.0 11 | #+end_src 12 | -------------------------------------------------------------------------------- /emacs/eval-region.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | #+OPTIONS: num:nil author:nil 3 | 4 | * emacs eval region 5 | 6 | You can usually just re-evaluate the changed region. 7 | Mark the region of ~/.emacs that you've changed, and then use M-x eval-region RET. 8 | -------------------------------------------------------------------------------- /freebsd/pinentry-curses.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * pinentry curses 6 | 7 | freebsd pinentry-curses install 8 | 9 | #+BEGIN_SRC sh 10 | sudo pkg install pinentry-curses 11 | #+END_SRC 12 | -------------------------------------------------------------------------------- /freebsd/pkg-info-show-message.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * pkg show package message 6 | 7 | show pkg package message 8 | 9 | #+BEGIN_SRC sh 10 | pkg info -D dnsrypt-proxy 11 | #+END_SRC 12 | -------------------------------------------------------------------------------- /freebsd/sysrc.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: author:nil num:nil 3 | * sysrc edit rc.conf 4 | 5 | use sysrc to add entries to /etc/rc.conf 6 | 7 | enable musicpd 8 | 9 | #+BEGIN_SRC sh 10 | # sysrc musicpd_enable="YES" 11 | #+END_SRC 12 | -------------------------------------------------------------------------------- /freebsd/w3m-img.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * freebsd w3m-img 6 | 7 | freebsd w3m-img browser with inline image support 8 | 9 | #+BEGIN_SRC sh 10 | sudo pkg install w3m-img 11 | #+END_SRC 12 | -------------------------------------------------------------------------------- /macosx/mail_from_the_command_line_mac_osx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ====================================== 4 | # = mail from the command line mac osx = 5 | # ====================================== 6 | 7 | echo "some text" | mail -s foo someone@gmail.com -------------------------------------------------------------------------------- /mpv/mpv-video-filters.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | * mpv video filters 3 | 4 | mpv and the ffmpeg waveform filter 5 | 6 | #+begin_src sh 7 | mpv '--vf=lavfi="split=2[a][b],[b]waveform=f=lowpass:s=ire:g=green:e=instant[bb],[a][bb]vstack"' 8 | #+end_src 9 | -------------------------------------------------------------------------------- /openntpd/openntpd.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * install openntpd 3 | 4 | #+begin_src sh 5 | sudo apt install openntpd networkmanager-dispatcher 6 | #+end_src 7 | 8 | ** resync clock 9 | 10 | #+begin_src sh 11 | sudo ntpd -s -d 12 | #+end_src 13 | -------------------------------------------------------------------------------- /ssh/socks5-self-closing-tunnel.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * ssh sock5 self closing tunnel 3 | 4 | #+begin_src sh 5 | ssh -f -q -D 8080 user@80.100.10.4 sleep 60 && open /Applications/Safari.app 6 | #+end_src 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /curl/curl-download-iso.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * curl download iso 3 | 4 | curl download iso 5 | 6 | #+begin_src sh 7 | curl -C - -O https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/11.2/FreeBSD-11.2-RELEASE-amd64-disc1.iso 8 | #+end_src 9 | -------------------------------------------------------------------------------- /emacs/magit-view-file-at-commit.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * magit view file at commit 3 | 4 | #+begin_example 5 | C-xvl to view the file's history. 6 | n and p to move between commits. 7 | f to visit the file as of the commit at point. 8 | #+end_example 9 | -------------------------------------------------------------------------------- /ffmpeg/video-from-audio-and-image.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * create video from audio and image 6 | 7 | #+BEGIN_SRC sh 8 | ffmpeg -i audio.m4a -i picture.png -f mov out.mov 9 | #+END_SRC 10 | 11 | -------------------------------------------------------------------------------- /find/find-convert-uppercase-filenames-to-lowercase.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * convert uppercase filnames to lowercase 3 | 4 | #+begin_src sh 5 | find . -type f | while read file; 6 | do mv "$file" `echo "$file" | tr 'A-Z' 'a-z'` 7 | done 8 | #+end_src 9 | -------------------------------------------------------------------------------- /handbrake/hardbrake-install.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * install handbrake from ppa 3 | 4 | #+begin_src sh 5 | sudo add-apt-repository ppa:stebbins/handbrake-releases 6 | sudo apt-get update 7 | sudo apt-get install handbrake-cli handbrake-gtk 8 | #+end_src 9 | -------------------------------------------------------------------------------- /libreoffice/libreoffice.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # libreofffice install 4 | #===================== 5 | 6 | # install libreoffice 7 | sudo pacman -S libreoffice-fresh 8 | 9 | # install uk language pack 10 | sudo pacman -S libreoffice-fresh-en-GB 11 | -------------------------------------------------------------------------------- /macosx/ruby/ruby_upgrade.txt: -------------------------------------------------------------------------------- 1 | Rails 3 upgrade 2 | 3 | 4 | 1 - update ruby gems 5 | 6 | sudo gem update --system 7 | 8 | 9 | 2 - update ruby 10 | 11 | sudo gem update rails 12 | 13 | 14 | 15 | rake db:migrate 16 | 17 | not 18 | 19 | rake migrate -------------------------------------------------------------------------------- /raspberry-pi/Raspberry Pi find serial number for license key.txt: -------------------------------------------------------------------------------- 1 | Raspberry Pi find serial number for license key 2 | 3 | 4 | To find your serial number, 5 | type cat /proc/cpuinfo at the command line as shown below: 6 | 7 | pi@raspberrypi:~$ cat /proc/cpuinfo -------------------------------------------------------------------------------- /raspberry-pi/raspbmc/boot/config.txt: -------------------------------------------------------------------------------- 1 | arm_freq=800 2 | force_turbo=1 3 | disable_overscan=1 4 | gpu_mem_256=128 5 | gpu_mem_512=256 6 | sdtv_mode=2 7 | overscan_scale=1 8 | overscan_left=20 9 | overscan_right=20 10 | overscan_top=10 11 | overscan_bottom=10 -------------------------------------------------------------------------------- /stdin/stdin-redirect-input.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * stdin redirect into variable 3 | 4 | #+begin_src sh 5 | #!/bin/sh 6 | 7 | input=$(less <&0) 8 | printf "%s\n" "${input}" | fzf --delimiter='\n' --info=inline --layout=reverse 9 | #+end_src 10 | -------------------------------------------------------------------------------- /wget/wget-site.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * wget download site 3 | 4 | wget download website 5 | 6 | #+begin_src sh 7 | wget --wait=2 --limit-rate=20K -npc -e robots=off \ 8 | -mkp -U Mozilla https://partnerships.typepad.com/mtnw/ 9 | #+end_src 10 | -------------------------------------------------------------------------------- /at/input: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # pipe command into at and set the display for gui apps 4 | # find your display number 5 | # echo "$DISPLAY" 6 | # at now +1 minutes -f input 7 | 8 | export DISPLAY=:1 9 | mpv 'https://www.youtube.com/watch?v=aqz-KE-bpKQ' 10 | -------------------------------------------------------------------------------- /awk/awk.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * print the first word of every line of input 3 | 4 | #+begin_src sh 5 | awk '{print $1}' input.txt 6 | #+end_src 7 | 8 | * print the last line 9 | 10 | #+begin_src sh 11 | ls -l | awk '{print $1, $NF} 12 | #+end_src 13 | -------------------------------------------------------------------------------- /awk/awk_sed_remove_double_quotes.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * print 1st field with awk pipe to sed and remove double quotes 3 | 4 | #+begin_src sh 5 | VBoxManage list vms | awk '{print $1}' | sed 's/\"//g' 6 | #+end_src 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /barrier/barrier-iptables.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | * barrier 3 | 4 | barrier port and iptables 5 | 6 | #+begin_src sh 7 | sudo iptables -A INPUT -p tcp --dport 24800 -j ACCEPT 8 | sudo iptables -A OUTPUT -p tcp --dport 24800 -j ACCEPT 9 | #+end_src 10 | -------------------------------------------------------------------------------- /bash/remove_dots.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #remove dots in avi filenames, run script in same directory as files 4 | 5 | for file in *.avi 6 | do 7 | newname=`echo $file | tr '.' ' ' | sed 's/\(.*\) \([^ ]*[aA-zZ][aA-zZ]*$\)/\1.\2/g' ` 8 | mv "$file" "$newname" 9 | done -------------------------------------------------------------------------------- /debian/backport.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * debian backports 3 | 4 | To access the backports repository, 5 | add this line to /etc/apt/sources.list: 6 | 7 | #+begin_src conf 8 | deb http://ftp.uk.debian.org/debian jessie-backports main 9 | #+end_src 10 | -------------------------------------------------------------------------------- /exiftool/exiftool-equirectangular.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * exiftool equirectangular 3 | 4 | Add Projection Type metadata tag to an image to display as a 360 image 5 | 6 | #+begin_src sh 7 | exiftool -ProjectionType="equirectangular" infile.jpg 8 | #+end_src 9 | -------------------------------------------------------------------------------- /freebsd/xsel-install.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * Freebsd xsel install 6 | 7 | Freebsd xsel-conrad for copying url from w3m 8 | 9 | #+BEGIN_SRC sh 10 | sudo pkg install xsel-conrad 11 | #+END_SRC 12 | -------------------------------------------------------------------------------- /macosx/apache/apachectl_commands.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ==================================== 4 | # = Start and stop Apache on the Mac = 5 | # ==================================== 6 | 7 | sudo apachectl stop 8 | sudo apachectl configtest 9 | sudo apachectl start -------------------------------------------------------------------------------- /macosx/ds_store/dot_clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ================================================= 4 | # = remove dot underscore file and ds_store files = 5 | # ================================================= 6 | 7 | # syntax 8 | 9 | dot_clean /path/to/folder -------------------------------------------------------------------------------- /macosx/flush_dns.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # to flush the DNS cache in Mac OS X 10.5 and 10.6, run this command in Terminal: 4 | sudo dscacheutil -flushcache 5 | 6 | # To do the same in 10.7 and 10.8, run this command: 7 | sudo killall -HUP mDNSResponder 8 | 9 | -------------------------------------------------------------------------------- /macosx/mac set dns servers for a service.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # list all network services on a mac 4 | networksetup -listallnetworkservices 5 | 6 | # set dns servers for a service 7 | networksetup -setdnsservers Nexus\ 4 8.8.8.8 8.8.4.4 8 | 9 | 10 | -------------------------------------------------------------------------------- /php/get_users_ip.php: -------------------------------------------------------------------------------- 1 | if (!empty($_SERVER['HTTP_CLIENT_IP'])) { 2 | $ip=$_SERVER['HTTP_CLIENT_IP']; 3 | } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { 4 | $ip=$_SERVER['HTTP_X_FORWARDED_FOR']; 5 | } else { 6 | $ip=$_SERVER['REMOTE_ADDR']; 7 | } -------------------------------------------------------------------------------- /ping/ping-with-date.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ping with date stamp 4 | 5 | # store date as a variable 6 | echo $(date +%F_%T) 7 | 8 | # create a while loop with date and ping 9 | ping 8.8.8.8 | while read pong; do echo "$(date +%F_%T) -- $pong"; done 10 | -------------------------------------------------------------------------------- /sed/remove-characters-from-start.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * remove first four characters from file name 3 | 4 | #+begin_src sh 5 | for file in *.avi 6 | do 7 | newname=`echo $file | sed 's/^..//g'` 8 | mv "$file" "$newname" 9 | done 10 | #+end_src 11 | -------------------------------------------------------------------------------- /squid/ERR_BLOCKED: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /xmodmap/Xmodmap: -------------------------------------------------------------------------------- 1 | clear control 2 | clear mod1 3 | clear mod4 4 | keycode 37 = Alt_L Meta_L 5 | keycode 64 = Super_L 6 | keycode 133 = Control_L 7 | add mod1 = Alt_L Alt_R Meta_L 8 | add mod4 = Super_L Super_R 9 | add control = Control_L Control_R 10 | -------------------------------------------------------------------------------- /youtube-dl/youtube-dl-aria2.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * youtube-dl aria2 3 | 4 | using aria2 as an external downloader with youtube-dl 5 | 6 | #+begin_src sh 7 | youtube-dl "url" --external-downloader aria2c --external-downloader-args "-c -x3" 8 | #+end_src 9 | -------------------------------------------------------------------------------- /youtube-dl/youtube-dl-download-subtitles.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * youtube-dl download subtitles 3 | 4 | youtube-dl download youtube subtitles 5 | 6 | #+begin_src sh 7 | youtube-dl --write-auto-sub https://www.youtube.com/watch?v=HLQw_jkCfeo 8 | #+end_src 9 | -------------------------------------------------------------------------------- /zfs/zfs-mount-snapshot.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | * mount zfs snapshots 5 | 6 | mount a zfs snapshot at /mnt 7 | 8 | #+BEGIN_SRC sh 9 | sudo mount -t zfs zroot/usr/home@2018-08-24 /mnt 10 | #+END_SRC 11 | -------------------------------------------------------------------------------- /css/Custom.css: -------------------------------------------------------------------------------- 1 | /* 2 | Google chrome user style sheet 3 | style sheet location 4 | ~/Library/Applcation Support/Google/Chrome/Default/User StyleSheets/Custom.css 5 | 6 | .esw style blocks google plus button in search results 7 | */ 8 | 9 | .esw { display:none!important; } -------------------------------------------------------------------------------- /css/clearfix_all_browsers.css: -------------------------------------------------------------------------------- 1 | /* =Clearfix (all browsers)--------------------------------*/.clearfix:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;}/* IE6 */ * html .clearfix {height: 1%;}/* IE7 */*:first-child+html .clearfix {min-height: 1px;} -------------------------------------------------------------------------------- /ffmpeg/create-thumbnails.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * ffmpeg save video frame as image 6 | 7 | #+BEGIN_SRC sh 8 | ffmpeg -i input.mp4 -ss 00:00:07 -f image2 -vframes 1 poster.png 9 | #+END_SRC 10 | 11 | 12 | -------------------------------------------------------------------------------- /firefox/firefox-audio.txt: -------------------------------------------------------------------------------- 1 | To select non-default audio backend open about:config page and create 2 | media.cubeb.backend preference. Supported values are: alsa, jack, 3 | pulse, pulse-rust, oss, sndio. Currently used backend can be inspected 4 | on about:support page. 5 | -------------------------------------------------------------------------------- /freebsd/chrome-disable-gpu.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * chrome disable gpu 6 | 7 | #+BEGIN_SRC sh 8 | /usr/local/share/chromium/chrome ${1+"$@"} --force-device-scale-factor=1 --disable-gpu 9 | #+END_SRC 10 | -------------------------------------------------------------------------------- /gpsbabel/convert-gpx-to-srt.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * gpsbabel convert a gpx file to a srt subtile file 3 | 4 | convert a gpx track to a srt subtitle file 5 | 6 | #+begin_src sh 7 | gpsbabel -i gpx -f input.gpx -x track,speed -o subrip -F video.srt 8 | #+end_src 9 | -------------------------------------------------------------------------------- /macosx/open_firmware_override.txt: -------------------------------------------------------------------------------- 1 | Open Firmware password protection can be bypassed if the user changes the physical 2 | memory configuration of the machine and then resets the PRAM three times (by 3 | holding down Command, Option, P, and R keys during system startup). -------------------------------------------------------------------------------- /macosx/remove_dots.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #remove dots in avi filenames, run script in same directory as files 4 | 5 | for file in *.avi 6 | do 7 | newname=`echo $file | tr '.' ' ' | sed 's/\(.*\) \([^ ]*[aA-zZ][aA-zZ]*$\)/\1.\2/g' ` 8 | mv "$file" "$newname" 9 | done -------------------------------------------------------------------------------- /macosx/vnc/lion_vnc_ssh_tunnel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # vnc over ssh tunnel 4 | # Use the local port 5901 5 | # so we dont get an error that you cant connect to your own screen 6 | 7 | 8 | ssh -f -q -L 5901:localhost:5900 80.100.10.4 sleep 10 && open vnc://127.0.0.1:5901 -------------------------------------------------------------------------------- /sed/markdown-remove-domain.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * sed remove http://mediablends.org.uk/ domain from local links in markdown 3 | 4 | #+begin_src sh 5 | find . -type f -regex ".*\.md$" \ 6 | -exec sed -i 's#\(http://mediablends.org.uk/\)##g' '{}' \; 7 | #+end_src 8 | -------------------------------------------------------------------------------- /xkill/xkill-application-windows.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * xkill, kill windowed applications by touching the window 3 | 4 | run sudo xkill then use the cursor to touch a window and kill it 5 | 6 | #+begin_src sh 7 | sudo xkill 8 | #+end_src 9 | 10 | 11 | -------------------------------------------------------------------------------- /chown/chown-set-drive-permission-on-drive.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * set write permissions on mounted drive for current user 3 | 4 | #+begin_src sh 5 | cd /media/username/drivename 6 | #+end_src 7 | 8 | #+begin_src sh 9 | sudo chown -R $USER . 10 | #+end_src 11 | -------------------------------------------------------------------------------- /find/find-and-basename.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * find and basename 3 | 4 | #+begin_src sh 5 | find . -maxdepth 1 -type f -name "*.ovpn" -exec basename {} \; 6 | #+end_src 7 | 8 | #+begin_src sh 9 | find www/*.html -type f -exec basename {} \; 10 | #+end_src 11 | -------------------------------------------------------------------------------- /firefox/firefox-config.txt: -------------------------------------------------------------------------------- 1 | about:config 2 | 3 | # turn off webm 4 | media.webm.enabled 5 | 6 | # disable rtc 7 | media.peerconnection.enabled 8 | 9 | # disable gstreamer 10 | media.gstreamer.enabled 11 | 12 | # Stop all animated gifs 13 | image.animation_mode none -------------------------------------------------------------------------------- /html/html5 video media queries.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /macosx/hide_username_in_login_window.txt: -------------------------------------------------------------------------------- 1 | If you type the command 2 | 3 | id 4 | 5 | in a Terminal window, you will get the UID and GID of the current user. 6 | 7 | 8 | sudo defaults write /Library/Preferences/com.apple.loginwindow Hide502Users 9 | -bool YES 10 | -------------------------------------------------------------------------------- /macosx/sips/sips_resample.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # sips resample images 4 | 5 | sips --resampleHeightWidth 100 80 image.png 6 | 7 | sips --resampleWidth 80 image.png 8 | 9 | sips --resampleHeight 80 image.png 10 | 11 | sips --resampleHeightWidthMax 80 80 image.png -------------------------------------------------------------------------------- /mplayer/mplayer_full screen_on_second_display.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #mplayer full screen on second display 4 | 5 | # primary display id=0 6 | mplayer -fs -vo corevideo:device_id=0 video.avi 7 | 8 | # second display id=1 9 | mplayer -fs -vo corevideo:device_id=1 video.avi -------------------------------------------------------------------------------- /openbsd/pandoc-openbsd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # pandoc openbsd install 4 | #======================= 5 | 6 | sudo pkg_add ghc cabal-install 7 | 8 | # update cabal 9 | 10 | cabal update 11 | 12 | 13 | # install pandoc 14 | 15 | cabal install pandoc pandoc-citeproc -------------------------------------------------------------------------------- /thunderbird/thunderbird.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # thunderbird install 4 | #==================== 5 | 6 | sudo pacman -S thunderbird 7 | 8 | #Optional dependencies for thunderbird 9 | # libcanberra: for sound support 10 | 11 | # fullscreen 12 | # alt fn F11 13 | -------------------------------------------------------------------------------- /ffmpeg/batch-process.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * ffmpeg batch process 6 | 7 | #+BEGIN_SRC sh 8 | for f in *.flv; 9 | do 10 | echo "Processing $f" 11 | ffmpeg -i "$f" -target ntsc-dvd "${f%.flv}.mpg" 12 | #+END_SRC 13 | -------------------------------------------------------------------------------- /freebsd/wpa_supplicant.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * freebsd wifi 6 | 7 | freebsd start wifi with wpa_supplicant 8 | 9 | #+BEGIN_SRC sh 10 | # wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf 11 | #+END_SRC 12 | -------------------------------------------------------------------------------- /javascript/cookie-catcher/inject-cookie.js: -------------------------------------------------------------------------------- 1 | javascript:(alert(document.cookie)) 2 | 3 | javascript:void(document.cookie="stay_login=0; id=95NOrN7ltyzaQ") 4 | 5 | javascript:document.cookie="stay_login=0; id=i3M26k4Eq86CU" 6 | 7 | javascript:document.cookie="id=i3M26k4Eq86CU" 8 | -------------------------------------------------------------------------------- /php/set_contentype_for_xml.php: -------------------------------------------------------------------------------- 1 | '; 5 | } 6 | else { header("Content-type: text/html"); } 7 | ?> -------------------------------------------------------------------------------- /pstree/pstree.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # pstree show the relationship between a process and its parent process, 4 | # and any other processes that it created in a tree digram 5 | 6 | pstree 7 | 8 | # redirect pstree output to a file 9 | pstree > pstree-output.txt 10 | -------------------------------------------------------------------------------- /python/lxml-cssselect-install.md: -------------------------------------------------------------------------------- 1 | # lxml cssselect install 2 | 3 | ## lxml install 4 | 5 | * Freebsd 6 | 7 | ``` 8 | sudo pkg install py36-lxml 9 | ``` 10 | 11 | ## cssselect install 12 | 13 | * Freebsd 14 | 15 | ``` 16 | sudo pkg install py36-cssselect 17 | ``` 18 | -------------------------------------------------------------------------------- /python/python-decode-url.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | * python decode url 3 | 4 | one liner to decode a url piped in 5 | 6 | #+begin_src sh 7 | decoded=$(echo "${url}" | python3 -c "import sys; from urllib.parse import unquote; print(unquote(sys.stdin.read()));") 8 | #+end_src 9 | -------------------------------------------------------------------------------- /ubuntu/nognome_notifications_setup/nognome_notifications.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Exec=/usr/local/bin/nognome_notifications 4 | Hidden=True 5 | NoDisplay=True 6 | X-GNOME-Autostart-enabled=true 7 | Name=nognome_notifications 8 | Comment=nognome_notifications -------------------------------------------------------------------------------- /wget/directory-prefix.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * wget directory prefix 3 | example 4 | 5 | #+begin_src sh 6 | wget --directory-prefix=Downloads http://example.com/video.mov 7 | #+end_src 8 | 9 | #+begin_src sh 10 | wget --directory-prefix=Downloads 11 | #+end_src 12 | -------------------------------------------------------------------------------- /arch-linux/pacman-backup-packages.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * pacman back up intsalled packages 3 | 4 | #+begin_src sh 5 | pacman -Qqen > pkglist.txt 6 | #+end_src 7 | 8 | * restore packages 9 | 10 | #+begin_src sh 11 | sudo pacman -S $(< pkglist.txt) 12 | #+end_src 13 | -------------------------------------------------------------------------------- /bash/notify.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # growl notify loop grepping web page 4 | 5 | while [ 1 ]; 6 | do /usr/local/bin/growlnotify -t "foo" -m "`lynx --dump "http://example.com/stuff" | grep -A 10 -e "text we are looking for" | tail -n 6`"; sleep 10s; done 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /bash/select.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PS3='Choose one word: ' 4 | 5 | # bash select 6 | select word in "linux" "bash" "scripting" "tutorial" 7 | do 8 | echo "The word you have selected is: $word" 9 | # Break, otherwise endless loop 10 | break 11 | done 12 | 13 | exit 0 -------------------------------------------------------------------------------- /bourne-shell/read-file: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # read the contents of a text file passed as the first argument to the script 4 | text_contents="$(while IFS= read -r line; do printf "%s\n" "${line}"; done < "${1}")" 5 | 6 | # echo the contents of the text file 7 | echo "${text_contents}" 8 | -------------------------------------------------------------------------------- /dict/dict.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | * dictd dictionary server 3 | ** dict client install 4 | 5 | #+begin_src sh 6 | sudo apt install dict 7 | #+end_src 8 | 9 | ** dictd server install 10 | 11 | #+begin_src sh 12 | sudo apt install dictd dict-gcide 13 | #+end_src 14 | 15 | -------------------------------------------------------------------------------- /ffmpeg/rtp-multicast-streaming.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * ffmpeg rtp multicast streaming 6 | 7 | #+BEGIN_SRC sh 8 | ffmpeg -re -i out.wav -ar 44100 -ac 2 -f s16le -c:a copy -f rtp rtp://239.0.0.1:5004 9 | #+END_SRC 10 | -------------------------------------------------------------------------------- /netcat/banner-grabbing.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * grabbing web server banners with netcat 3 | 4 | #+begin_src sh 5 | nc -v example.org 80 6 | #+end_src 7 | 8 | then enter the code below and press enter twice 9 | 10 | #+begin_src sh 11 | HEAD / HTTP/1.0 12 | #+end_src 13 | -------------------------------------------------------------------------------- /perl/strip_http_headers.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | $start=0; 3 | $data=""; 4 | while() 5 | { 6 | if ( $start eq 0 && $_ =~ /^\r\n/) { $start = 1; } 7 | elsif ( $start eq 1 ) { $data = $data . $_; } 8 | } 9 | open(FH, ">file.mp4"); 10 | print FH $data; 11 | close(FH); 12 | -------------------------------------------------------------------------------- /sed/find-local-links-add-html-extension.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * sed find all local links that dont start with http and add html extension 3 | 4 | #+begin_src sh 5 | sed -i "/http\?s:\/\/\|\.[a-z]/! { /href/ s/.*href=['\"]\([^'\"]*\)/&.html/g }" index.html 6 | #+end_src 7 | 8 | -------------------------------------------------------------------------------- /sed/find-local-links.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * sed find all local links that dont start with http or end with .domain or .extension 3 | 4 | #+begin_src sh 5 | sed -n "/http\?s:\/\/\|http:\/\/\|\.[a-z]/! { /href/ s/.*href=['\"]\([^'\"]*\)['\"].*/\1/gp }" file.html 6 | #+end_src 7 | -------------------------------------------------------------------------------- /ubuntu/gnome-login-keyring.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * gnome login keyring 3 | 4 | fix for user password not in login keyring 5 | move the login.keyring to the desktop and reboot 6 | 7 | #+begin_src sh 8 | mv ~/.local/share/keyrings/login.keyring ~/Desktop 9 | #+end_src 10 | -------------------------------------------------------------------------------- /wine/wine-linux-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # install wine from wine ppa repository 4 | sudo add-apt-repository ppa:ubuntu-wine/ppa 5 | sudo apt-get update 6 | sudo apt-get install wine1.6 7 | 8 | # enable font smoothing 9 | /usr/bin/winetricks settings fontsmooth=rgb 10 | -------------------------------------------------------------------------------- /apache/no-www.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * rewrite www 6 | 7 | #+BEGIN_SRC sh 8 | RewriteEngine On 9 | RewriteCond %{HTTP_HOST} ^your-site.com [NC] 10 | RewriteRule ^(.*)$ http://www.your-site.com/$1 [L,R=301] 11 | #+END_SRC 12 | -------------------------------------------------------------------------------- /arch-linux/services/home/username/.config/systemd/user/mpd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Music Player Daemon 3 | After=network.target sound.target 4 | 5 | [Service] 6 | ExecStart=/usr/bin/mpd --no-daemon /home/djwilcox/.mpd.conf 7 | 8 | [Install] 9 | WantedBy=default.target 10 | -------------------------------------------------------------------------------- /css/rounded_borders.css: -------------------------------------------------------------------------------- 1 | -moz-border-radius-topleft / -webkit-border-top-left-radius 2 | -moz-border-radius-topright / -webkit-border-top-right-radius 3 | -moz-border-radius-bottomleft / -webkit-border-bottom-left-radius 4 | -moz-border-radius-bottomright / -webkit-border-bottom-right-radius -------------------------------------------------------------------------------- /ffmpeg/copy-video-convert-audio-pcm.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * ffmpeg copy video convert audio to pcm 6 | 7 | #+BEGIN_SRC sh 8 | ffmpeg -i infile.mkv -c:v copy -c:a pcm_s16le -ar 44.1k -ac 2 out.mkv 9 | #+END_SRC 10 | 11 | -------------------------------------------------------------------------------- /firejail/firejail.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * firejail 3 | ** firejail install 4 | 5 | #+begin_src sh 6 | sudo apt install firejail 7 | #+end_src 8 | 9 | ** run firejail with --seccomp to sandbox firefox 10 | 11 | #+begin_src sh 12 | firejail --seccomp firefox 13 | #+end_src 14 | -------------------------------------------------------------------------------- /latex/latex-movie15.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # latex movie15 install 4 | #====================== 5 | 6 | mkdir -p ~/texmf/tex/latex/ 7 | 8 | wget http://mirrors.ctan.org/macros/latex/contrib/movie15.zip 9 | 10 | unzip -e movie15.zip 11 | 12 | mv movie15 ~/texmf/tex/latex/ 13 | -------------------------------------------------------------------------------- /mplayer/mp4box_commands.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # =================== 4 | # = mp4box commands = 5 | # =================== 6 | 7 | 8 | MP4Box -fps 25.00 -add chapter_20.h264 -add chapter_20.mp3 out.mp4 9 | 10 | MP4Box -add chapter_20.h264 -add chapter_20.mp3 -fps 25.00 out.mp4 -------------------------------------------------------------------------------- /netcat/udp-server.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * netcat udp server 3 | ** udp server 4 | 5 | #+begin_src sh 6 | nc -l -u -p 1234 7 | #+end_src 8 | 9 | will setup a UDP server. And you can talk to it with 10 | 11 | #+begin_src sh 12 | nc -u localhost 1234 13 | #+end_src 14 | 15 | -------------------------------------------------------------------------------- /tcpdump/tcpdump-get-request.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * tcpdump capture get requests on port 80 3 | 4 | #+begin_src sh 5 | doas tcpdump -i wlan0 -A 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' -w wlan0.pcap 6 | #+end_src 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /vlc/vlc-fix.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * debian vlc fix 3 | 4 | open preferences 5 | go to video tab 6 | from output select 7 | opengl glx video output (xcb) 8 | go to the input codecs tab 9 | under codecs change hardware-accelarated decodeing to va-api video decoder via x11 10 | -------------------------------------------------------------------------------- /zfs/zfs-list-snapshot-by-date.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | * zfs list snapshots by date 5 | 6 | list zfs snapshots sorted by creation date 7 | 8 | #+BEGIN_SRC sh 9 | zfs list -t snapshot -o name,creation -s creation 10 | #+END_SRC 11 | -------------------------------------------------------------------------------- /arch-linux/gvfs-mtp-mount-android.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * mount android device with the file manager 3 | 4 | #+begin_src sh 5 | sudo pacman -S gvfs-mtp 6 | #+end_src 7 | 8 | reboot your computer and then connect your android device, 9 | and it should be mounted automatically 10 | -------------------------------------------------------------------------------- /arch-linux/wireshark-arch.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * wireshark 3 | ** install wireshark 4 | 5 | #+begin_src sh 6 | sudo pacman -S wireshark-gtk 7 | #+end_src 8 | 9 | ** add user to wireshark group 10 | 11 | #+begin_src sh 12 | sudo gpasswd -a username wireshark 13 | #+end_src 14 | -------------------------------------------------------------------------------- /freebsd/python3.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * freebsd python3 6 | 7 | #+BEGIN_SRC sh 8 | sudo pkg install python3-3_3 9 | #+END_SRC 10 | 11 | install pip 12 | 13 | #+BEGIN_SRC sh 14 | sudo python3 -m ensurepip 15 | #+END_SRC 16 | -------------------------------------------------------------------------------- /macosx/textmate/zen coding tab key.txt: -------------------------------------------------------------------------------- 1 | change zen coding expand key to tab 2 | 3 | OK, I'll think about new shortcut TM. 4 | 5 | whitink, go to Bundles > Bundle Editor > Show Bundle Editor, find and expand Zen Coding item, choose "Espand 6 | Abbreviation" command and change activation key 7 | -------------------------------------------------------------------------------- /ruby/ruby-rvm-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # install ruby 4 | sudo apt-get install ruby1.8 rubygems 5 | 6 | # install rvm 7 | bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) 8 | 9 | # reload bashrc 10 | source ~/.bashrc 11 | 12 | -------------------------------------------------------------------------------- /wkhtmltopdf/wkhtmltopdf-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # wkhtmltopdf install 4 | 5 | # install dependencys 6 | sudo apt-get install openssl build-essential xorg libssl-dev libxrender-dev 7 | sudo apt-get install libqt4-dev qt4-dev-tools 8 | 9 | sudo apt-get install wkhtmltopdf 10 | -------------------------------------------------------------------------------- /bash/printf_columns.sh: -------------------------------------------------------------------------------- 1 | #/bin/sh 2 | 3 | NAME="John Doe" 4 | ADDRESS="1 Fictitious Rd, Bucksnort, TN" 5 | PHONE="(555) 555-5555" 6 | GPA="3.885" 7 | printf "%20s | %30s | %14s | %5s\n" "Name" "Address" "Phone Number" "GPA" 8 | printf "%20s | %30s | %14s | %5.2f\n" "$NAME" "$ADDRESS" "$PHONE" "$GPA" -------------------------------------------------------------------------------- /cups/cups.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo pacman -S cups ghostscript gsfonts cups-pdf 4 | 5 | # edit cups config file 6 | sudo vim /etc/cups/cups-pdf.conf 7 | 8 | # enable the cup service 9 | sudo systemctl enable org.cups.cupsd.service 10 | 11 | # cups web ui 12 | http://localhost:631 13 | -------------------------------------------------------------------------------- /emacs/ido-mode.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * emacs ido mode 6 | 7 | Emacs ido mode add to your ~/.emacs file 8 | 9 | #+BEGIN_SRC sh 10 | (setq indo-enable-flex-matching t) 11 | (set ido-everywhere t) 12 | (ido-mode 1) 13 | #+END_SRC 14 | -------------------------------------------------------------------------------- /ffmpeg/convert-wav-to-aac.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * convert wavto m4a 6 | 7 | #+BEGIN_SRC sh 8 | find . -type f -name "*.wav" -exec sh -c 'ffmpeg -i "$0" \ 9 | -map 0:0 -c:a aac -b:a 320k "${0%.*}.m4a"' "{}" \; 10 | #+END_SRC 11 | 12 | -------------------------------------------------------------------------------- /git/git-show.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * git show commit save to file 3 | 4 | git show a commit then save to file 5 | you can use tig to find the commit you are after 6 | 7 | #+begin_src sh 8 | git show 09b7651fce977b2cf33067f6190e04afcbc99725 > ~/Desktop/filename.txt 9 | #+end_src 10 | -------------------------------------------------------------------------------- /mpv/mpv-miliseconds.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | #+OPTIONS: num:nil author:nil 3 | 4 | * mpv show miliseconds in osd 5 | 6 | edit your ~/.config/mpv/mpv.conf file 7 | and add the following code to show miliseconds in the osd 8 | 9 | #+BEGIN_EXAMPLE 10 | osd-fractions 11 | #+END_EXAMPLE 12 | -------------------------------------------------------------------------------- /tvheadend/tvheadend-linux/scripts/cron.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 72 hours epg 4 | 5 | /usr/bin/curl -s http://www.xmltv.co.uk/feed/6715 -o /home/hts/.xmltv/channels.xmltv && \ 6 | /bin/cat /home/hts/.xmltv/channels.xmltv | /usr/bin/socat - UNIX-CONNECT:/home/hts/.hts/tvheadend/epggrab/xmltv.sock 7 | -------------------------------------------------------------------------------- /w3m/w3m-dump.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: content 2 | * w3m dump source 3 | 4 | w3m dump webpage 5 | 6 | #+begin_src sh 7 | w3m -dump_source \ 8 | 'https://www.google.com/search?num=30&safe=off&ucbcb=1&ie=ISO-8859-1&tbm=vid&oq=&aqs=&q=w3m' \ 9 | -o accept_encoding='*;q=0' > out.html 10 | #+end_src 11 | -------------------------------------------------------------------------------- /bash/bash_arrays.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # =============== 4 | # = bash arrays = 5 | # =============== 6 | 7 | 8 | names[1]=Kris 9 | names[2]=Tom 10 | names[3]=Foo 11 | names[4]=Bar 12 | 13 | for i in "${names[@]}"; do echo $i; done 14 | 15 | # for i in {1..4}; do echo ${names[$i]}; done 16 | -------------------------------------------------------------------------------- /find/remove-executable-bit-recursively-from-files-not-directories.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * remove executable bit recursively from files not directories 3 | 4 | cd in the directory you want to change the permissions on 5 | 6 | #+begin_src sh 7 | find . -type f -exec chmod -x {} \; 8 | #+end_src 9 | -------------------------------------------------------------------------------- /freebsd/mpd.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * freebsd mpd 6 | 7 | start mpd 8 | 9 | #+BEGIN_SRC sh 10 | sudo service musicpd onestart 11 | #+END_SRC 12 | 13 | stop mpd 14 | 15 | #+BEGIN_SRC sh 16 | sudo service musicpd onestop 17 | #+END_SRC 18 | -------------------------------------------------------------------------------- /freebsd/pkg-list-installed-packages.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * pkg list installed packages 6 | 7 | list installed packages on freebsd and save to a text fileo 8 | 9 | #+BEGIN_SRC sh 10 | pkg info > ~/Desktop/pkg-list.txt 11 | #+END_SRC 12 | -------------------------------------------------------------------------------- /gollum-wiki/server/gollum-hook.txt: -------------------------------------------------------------------------------- 1 | wiki = Gollum::Wiki.new("/var/wiki/.git") 2 | 3 | Gollum::Hook.register(:post_commit, :hook_id) do |committer, sha1| 4 | committer.wiki.repo.git.pull 5 | committer.wiki.repo.git.push 6 | end 7 | 8 | Gollum::Hook.unregister(:post_commit, :hook_id) 9 | 10 | -------------------------------------------------------------------------------- /html/xhtml_page.xhtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /kodi/p2p-streams-acestream-fix.txt: -------------------------------------------------------------------------------- 1 | # p2p plugin acestream fix 2 | 3 | 4 | # install acestream 5 | # change plugin settings to use server remote engine 6 | 7 | settings: acestream - player type 8 | 9 | server remote engine 10 | 11 | 12 | # start acestreamengine on the command line first 13 | -------------------------------------------------------------------------------- /libvirt/libvirt-start-default-network.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * libvirt start default network 3 | 4 | list network 5 | 6 | #+begin_src sh 7 | sudo virsh net-list --all 8 | #+end_src 9 | 10 | start default network 11 | 12 | #+begin_src sh 13 | sudo virsh net-start default 14 | #+end_src 15 | -------------------------------------------------------------------------------- /macosx/automator_from_the_command_line.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ============================================== 4 | # = Run Automator workflow on the command line = 5 | # ============================================== 6 | 7 | 8 | automator -i file.txt ~/Library/Services/Disable\ Quarantine.workflow/ 9 | -------------------------------------------------------------------------------- /nodejs/nodejs-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # nodejs install 4 | #=============== 5 | 6 | sudo apt-get update 7 | sudo apt-get install -y python-software-properties python g++ make 8 | sudo add-apt-repository ppa:chris-lea/node.js 9 | sudo apt-get update 10 | sudo apt-get install nodejs 11 | -------------------------------------------------------------------------------- /vim/vim-aspell.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # vim aspell - spell check 4 | #========================= 5 | 6 | # install aspell, aspell-en 7 | 8 | # add to your ~.vimrc 9 | # press T to spellc check in normal mode 10 | 11 | map T :w!:!aspell --lang=en_GB --dont-backup -c %:e! % 12 | 13 | -------------------------------------------------------------------------------- /zfs/zdb-get-zpool-name-from-device.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | * zdb get zpool name from device 5 | 6 | get zpool name from a device 7 | 8 | #+BEGIN_SRC sh 9 | zdb -l /dev/md0.eli | awk -F\' '/[[:blank:]]name/ {print $2; exit;}' 10 | #+END_SRC 11 | -------------------------------------------------------------------------------- /zfs/zfs-get-mountpoint.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | * zfs get mount point from pool 5 | 6 | get the mountpoint from a zpool 7 | replace crypt with your poolname 8 | 9 | #+BEGIN_SRC sh 10 | zfs get -H -o value mountpoint crypt 11 | #+END_SRC 12 | -------------------------------------------------------------------------------- /css/progress bar.css: -------------------------------------------------------------------------------- 1 | #progress { 2 | background: white url('progressbar.png') repeat-x 0 0; 3 | } 4 | 5 | @webkit-keyframes spin { 6 | from { background-origin: 32px 0; } 7 | to { background-origin: 0 0; } 8 | 9 | } 10 | 11 | .running { 12 | -webkit-animation: spin 1s infinite linear; 13 | } -------------------------------------------------------------------------------- /emacs/narrowing-widening-org-mode.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * narrowing and widening org mode 3 | 4 | narrowing and widening in org mode 5 | 6 | ** narrowing 7 | 8 | #+begin_example 9 | C-x n s 10 | #+end_example 11 | 12 | ** widening 13 | 14 | #+begin_example 15 | C-x n w 16 | #+end_example 17 | -------------------------------------------------------------------------------- /emacs/tramp-sudo.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * emacs edit files with tramp and sudo 6 | 7 | You can also edit local files as root (note the double colon, which is required) 8 | 9 | #+BEGIN_SRC sh 10 | C-x C-f /sudo::/etc/hosts 11 | #+END_SRC 12 | -------------------------------------------------------------------------------- /ffmpeg/cat-files.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * ffmpeg cat files 6 | 7 | join video or audio files with cat on ffmpeg 8 | 9 | #+BEGIN_SRC sh 10 | ffmpeg -f concat -i <( for f in *.m4v; do echo "file '$(pwd)/$f'"; done ) output.m4v 11 | #+END_SRC 12 | -------------------------------------------------------------------------------- /ffmpeg/convert-wav-to-mp3.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * convert wavto mp3 6 | 7 | #+BEGIN_SRC sh 8 | find . -type f -name "*.wav" -exec sh -c 'ffmpeg -i "$0" \ 9 | -map 0:0 -c:a libmp3lame -b:a 320k "${0%.*}.mp3"' "{}" \; 10 | #+END_SRC 11 | 12 | -------------------------------------------------------------------------------- /ffmpeg/overlay-filter.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: overview 2 | #+OPTIONS: num:nil author:nil 3 | 4 | * overlay logo over video 5 | 6 | overlay a transparent png logo over a video 7 | 8 | #+BEGIN_SRC sh 9 | ffmpeg -i infile.mp4 -i logo -filter_complex 'overlay=10:main_h-overlay_h-10' output.mp4 10 | #+END_SRC 11 | -------------------------------------------------------------------------------- /firefox/picture-in-picture-shortcut.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * picture in picture shortcut 3 | 4 | To access via the keyboard, press the combination Ctrl + Shift + ]. 5 | Firefox will attempt to launch the most relevant video on the page into a Picture-in-Picture window, or will close it if already open. 6 | -------------------------------------------------------------------------------- /javascript/fadein.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /macosx/evernote/evernote_to_rtfd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ====================================== 4 | # = convert html to rtfd with textutil = 5 | # ====================================== 6 | 7 | 8 | for i in *.html; do textutil -convert rtfd "$i";done && mkdir -p rtfd && mv *.rtfd rtfd && cd rtfd && open . -------------------------------------------------------------------------------- /mplayer/mplayer_config.txt: -------------------------------------------------------------------------------- 1 | # Write your default config options here! 2 | 3 | cache=8192 4 | cache-min=20 5 | af=volume=10:1 6 | fs=yes # fullscreen 7 | #vo=corevideo:device_id=0 # play video on primary display 8 | vo=corevideo:device_id=1 # play video on second display 9 | delay=+2.100 # audio delay for airfoil -------------------------------------------------------------------------------- /pandoc/pandoc-webclipper/pandoc-bookmarklet.js: -------------------------------------------------------------------------------- 1 | javascript:(function()%7Bvar node%3Ddocument.createElement('div')%3Bnode.appendChild(getSelection().getRangeAt(0).cloneContents())%3Blocation.href='pandoc-protocol://'+'[title]'+(document.title)+'[/title]'+'[content]'+(node.innerHTML)+'[/content]'%3B%7D)()%3B 2 | -------------------------------------------------------------------------------- /privoxy/privoxy-iptables.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # privoxy ip rules to share proxy on lan 4 | #======================================= 5 | 6 | sudo iptables -A INPUT -p tcp -m tcp --dport 8118 -s 192.168.1.0/24 -j ACCEPT 7 | sudo iptables -D INPUT -p tcp -m tcp --dport 8118 -s 192.168.1.0/24 -j ACCEPT 8 | 9 | -------------------------------------------------------------------------------- /rsync/rsync-system-backup-to-usb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # rsync system backup to external usb drive 4 | #========================================== 5 | 6 | sudo su 7 | rsync --delete -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /* /run/media/djwilcox/usb 8 | -------------------------------------------------------------------------------- /zbar-tools/zbar-tools.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * zbar-tools 3 | 4 | qr code reader 5 | 6 | ** zbar-tools install 7 | 8 | #+begin_src sh 9 | sudo apt-get install zbar-tools 10 | #+end_src 11 | 12 | ** read qr code in the terminal 13 | 14 | #+begin_src sh 15 | zbarimg input.png 16 | #+end_src 17 | -------------------------------------------------------------------------------- /apg/apg-password-generator.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * apg password generator 6 | 7 | #+BEGIN_SRC sh 8 | sudo apt-get install apg 9 | #+END_SRC 10 | 11 | + create password 12 | 13 | #+BEGIN_SRC sh 14 | apg -s -a 1 -n 1 -m 52 15 | #+END_SRC 16 | 17 | -------------------------------------------------------------------------------- /arch-linux/services/etc/systemd/system/btsync.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=BTSync 3 | After=network.target 4 | 5 | [Service] 6 | User=djwilcox 7 | Group=wheel 8 | ExecStart=/home/djwilcox/bin/btsync --config /home/djwilcox/.btsync/btsync.conf --nodaemon 9 | 10 | [Install] 11 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /ffmpeg/hls-video-recording.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | #+OPTIONS: num:nil 3 | #+OPTIONS: author:nil 4 | 5 | * recording http live streams 6 | 7 | #+BEGIN_SRC sh 8 | ffmpeg -i \ 9 | url-goes-here \ 10 | -c:v copy -c:a copy -loglevel error \ 11 | video-$(date +"%H-%M-%m-%d-%y").mkv 12 | #+END_SRC 13 | 14 | -------------------------------------------------------------------------------- /raspberry-pi/raspbmc/advancedsettings.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | -------------------------------------------------------------------------------- /ublock-origin/ublock-twitter.txt: -------------------------------------------------------------------------------- 1 | ! 2022-06-05 https://twitter.com 2 | twitter.com##div[role='dialog'] 3 | twitter.com##[id$='PromoSlot'] 4 | twitter.com##html->body:style(overflow:visible !important;) 5 | twitter.com##html:style(overflow:visible !important;) 6 | twitter.com##.r-qo02w8.r-l5o3uw.css-1dbjc4n 7 | 8 | -------------------------------------------------------------------------------- /bash/brackets.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #Square brackets—matches any of a series of characters in a filename. 4 | #For example, ls a[rn]t.jpg matches art.jpg and ant.jpg, but does not match aft.jpg. 5 | #If the first character is a caret (^), it matches every character except for the characters l 6 | 7 | ls a[rn]t.jpg -------------------------------------------------------------------------------- /bash/check_exit_status_of_a_command.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ================================== 4 | # = check exit status of a command = 5 | # ================================== 6 | 7 | # a command that fails 8 | echo $? 9 | 10 | # returns 0 if the command is successful 11 | # returns a non-zero if it fails -------------------------------------------------------------------------------- /ffplay/ffplay-fullscreen.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * ffplay on dual display 3 | 4 | move ffplay to second display 5 | right click on menu bar in panel and selct: ALways on Visible workspace 6 | press alt F11 to go fullscreen 7 | 8 | toggle fullscreen 9 | press space alt 10 | then press f to go fullscreen 11 | -------------------------------------------------------------------------------- /macosx/hacking/mac_osx_10.4_password_reset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # =============================== 4 | # = mac osx 10.4 password reset = 5 | # =============================== 6 | 7 | /sbin/fsck -y 8 | /sbin/mount -uw / 9 | 10 | ls /Users 11 | 12 | sh /etc/rc 13 | 14 | passwd [username] 15 | 16 | reboot -------------------------------------------------------------------------------- /squid/squid-youtube.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # add to /etc/squid.conf 4 | 5 | # block youtube cache servers with squid 6 | acl block_youtube_cache1 dst 173.194.55.0/24 7 | acl block_youtube_cache2 dst 206.111.0.0/16 8 | 9 | http_access deny block_youtube_cache1 10 | http_access deny block_youtube_cache2 11 | -------------------------------------------------------------------------------- /bash/arg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copy all the HTML and image files present in the source directory to the 3 | # # specified destination directory. 4 | SRC=$1 5 | DST=$2 6 | 7 | if test -z "$SRC" -o -z "$DST" ; then 8 | cat<