Skip to content

Instantly share code, notes, and snippets.

View vvmk's full-sized avatar
🥼

Violet Masiello vvmk

🥼
View GitHub Profile
// set these three first
// intended for use with sr-only class found here https://gist.github.com/ffoodd/000b59f431e3e64e4ce1a24d5bb36034
let targetClass = 'jkit-video-popup-btn';
let linkText = 'play video';
let classList = 'sr-only';
let childSpan = document.createElement('span');
childSpan.innerHTML = linkText;
childSpan.className = classList;
@vvmk
vvmk / get_3_most_recent_posts.php
Created April 27, 2021 20:20
Replicating a wordpress '3 most recent blog posts' widget for use by non-wordpress areas of wordpress sites. fuck.
select posts.post_date,u.display_name author,posts.post_title title,posts.guid post_link,thumbs.guid thumbnail_link
from (
select p.post_date,p.post_author,p.post_title,p.guid,m.meta_value
from (
select pp.ID,pp.post_title,pp.post_author,pp.post_date,pp.guid
from ep_posts pp
where pp.post_status = 'publish'
order by pp.post_date desc
limit 3
) as p
@vvmk
vvmk / generate-ssh-key.sh
Created March 29, 2021 13:03 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa
@vvmk
vvmk / tmxsync.sh
Created October 14, 2019 13:46 — forked from kouk/tmxsync.sh
tmux synchronize-windows
# tmxsync: bring all windows as panes into one window and activate the "synchronize-panes" option
# tmxunsync: split all panes into different windows and deactivate the "synchronize-panes" option.
# Licence:
# To the extent possible under law I, Konstantinos Koukopoulos, have waived all copyright and related or neighboring rights to tmxsync.sh, as describe by the CC0 document:
# http://creativecommons.org/publicdomain/zero/1.0/
# This work is published from: Greece.
tmxsync () {
export _TMUX_SYNC=1;
scons: Reading SConscript files ...
Using platform 'linux-gcc-sh: g++: command not found'
LD_LIBRARY_PATH = :libs/linux-gcc-sh: g++: command not found
Building using PLATFORM = linux-gcc-sh: g++: command not found
scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/Users/vince/Code/tent/libattic/third_party/jsoncpp/SConstruct", line 193, in buildProjectInDirectory
scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/Users/vince/Code/tent/libattic/third_party/jsoncpp/SConstruct", line 193, in buildProjectInDirectory
scons: Reading SConscript files ...
Using platform 'linux-gcc-sh: g++: command not found'
LD_LIBRARY_PATH = :libs/linux-gcc-sh: g++: command not found
Building using PLATFORM = linux-gcc-sh: g++: command not found
scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/Users/vince/Code/tent/libattic/third_party/jsoncpp/SConstruct", line 193, in buildProjectInDirectory
scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/Users/vince/Code/tent/libattic/third_party/jsoncpp/SConstruct", line 193, in buildProjectInDirectory