Skip to content

Instantly share code, notes, and snippets.

View AdeptSEO's full-sized avatar

Веб-студия «AdeptSEO» AdeptSEO

View GitHub Profile
@AdeptSEO
AdeptSEO / image_downloader.js
Created October 17, 2023 14:10 — forked from sfrdmn/image_downloader.js
Bookmarklet to download all images on a page
;(function() {
var images = [].slice.call(document.querySelectorAll('img'))
try {
images.forEach(function(img) {
downloadImage(img)
})
} catch (e) {
alert("Download failed.");
console.log('Download failed.', e);
}
placeholder
@AdeptSEO
AdeptSEO / no-x.js
Created July 22, 2023 09:08 — forked from mhulse/no-x.js
[no-js] [no-touch] JavaScript utilities to put in <head> of HTML templates that will add `js` or `touch` classes for use in CSS and/or JS.
<!doctype html>
<html class="no-touch no-js">
<head>
<script> /* PUT `no-x.js` here, as early as possible, before any other CSS or JS calls ... */ </script>
</head>
...
@AdeptSEO
AdeptSEO / ffmpegconcat.sh
Created July 17, 2023 10:41 — forked from ryanfb/ffmpegconcat.sh
Short shell script for concatenating video files with ffmpeg's "concat" demuxer, using command line arguments.
#!/bin/bash
# Usage:
# ./ffmpegconcat.sh input1.mp4 input2.mp4 input3.mp4 output.mp4
# See: https://trac.ffmpeg.org/wiki/Concatenate
for input in "${@:1:$#-1}"; do echo "file '$input'"; done > filelist.txt
ffmpeg -f concat -safe 0 -i filelist.txt -c copy "${@: -1}"
echo "Concatenated:" && cat filelist.txt && rm -f filelist.txt
@AdeptSEO
AdeptSEO / .bash_profile
Created June 13, 2023 07:26 — forked from jonsuh/.bash_profile
Bash echo in color
# ----------------------------------
# Colors
# ----------------------------------
NOCOLOR='\033[0m'
RED='\033[0;31m'
GREEN='\033[0;32m'
ORANGE='\033[0;33m'
BLUE='\033[0;34m'
PURPLE='\033[0;35m'
CYAN='\033[0;36m'
@AdeptSEO
AdeptSEO / chaturbate.sh
Created June 9, 2023 15:42
Chaturbate recorder
#!/bin/sh
URL="${2}"
NAME="$(echo "${URL}" | sed 's#.*/\([^/]*\)/$#\1#')"
pgrep -f "/${NAME}-.*/playlist.m3u8" && exit
STREAM="$(curl -s "${URL}" | grep hlsSourceFast | sed -n 's#.*\(https://.*/playlist.m3u8\).*#\1#p')"
ROOT_DIR=$HOME/x
case "${1}" in
vlc|v)
@AdeptSEO
AdeptSEO / aria2.conf
Created December 3, 2022 11:09 — forked from qzm/aria2.conf
Best aria2 Config
### Basic ###
# The directory to store the downloaded file.
dir=${HOME}/Downloads
# Downloads the URIs listed in FILE.
input-file=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to FILE on exit.
save-session=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to a file specified by --save-session option every SEC seconds. If 0 is given, file will be saved only when aria2 exits. Default: 0
save-session-interval=60
# Set the maximum number of parallel downloads for every queue item. See also the --split option. Default: 5
@AdeptSEO
AdeptSEO / index.html
Created April 29, 2022 04:46 — forked from miguelmota/index.html
Hugo render from JSON file data
<!-- posts.json must be at root level -->
{{ $items := getJSON "posts.json" }}
{{ range $item := $items }}
<a href="{{ $item.url }}">{{ $item.name }}</a>
{{ end }}
gulp.task("watch-upload", function() {
gulp.watch("src/**/*", function(obj) {
if(["changed", "added"].indexOf(obj.type) !== -1) {
gulp.src(obj.path, {"base": "src/"})
.pipe(sftp(config.sftp));
}
});
});
@AdeptSEO
AdeptSEO / index.html
Created March 11, 2022 03:33 — forked from joelgarzatx/index.html
Masonry - imagesLoaded progress, vanilla JS
<h1>Masonry - imagesLoaded progress, vanilla JS</h1>
<div class="grid">
<div class="grid-sizer"></div>
<div class="grid-item">
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/82/orange-tree.jpg" />
</div>
<div class="grid-item">
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/82/submerged.jpg" />
</div>