Skip to content

Instantly share code, notes, and snippets.

View superkeyor's full-sized avatar

Keyor superkeyor

View GitHub Profile
@superkeyor
superkeyor / README.MD
Created March 9, 2023 21:14 — forked from RichardBronosky/README.MD
cb - A leak-proof tee to the clipboard - Unify the copy and paste commands into one intelligent chainable command.

cb

A leak-proof tee to the clipboard

This script is modeled after tee (see [man tee][2]) and works on Linux, macOS, Cygwin, WSL/WSL2

It's like your normal copy and paste commands, but unified and able to sense when you want it to be chainable.

This project started as an answer to the StackOverflow question: [How can I copy the output of a command directly into my clipboard?][3]

@superkeyor
superkeyor / medium-to-scribe.js
Created December 20, 2022 23:33 — forked from samhenrigold/medium-to-scribe.js
UserScript to redirect medium.com articles to scribe.rip
// ==UserScript==
// @name Medium to Scribe
// @description Redirects Medium.com articles to scribe.rip
// @match *://*/*
// @exclude /^https?://(www\.)?medium\.com/((\?.*)|((m|about|creators|membership)/.*))$/
// @run-at document-end
// @version 1.2.4
// @updateURL https://gist.githubusercontent.com/samhenrigold/4a082dde823bc3cb62e43a2fc2b12b8e/raw/medium-to-scribe.js
// ==/UserScript==
@superkeyor
superkeyor / ffmpeg-commands.sh
Created September 6, 2022 03:55 — forked from 44213/ffmpeg-commands.sh
ffmpeg commands.
# To extract the sound from a video and save it as MP3:
ffmpeg -i <video.mp4> -vn <sound>.mp3
# To convert frames from a video or GIF into individual numbered images:
ffmpeg -i <video.mpg|video.gif> <frame_%d.png>
# To combine numbered images (frame_1.jpg, frame_2.jpg, etc) into a video or GIF:
ffmpeg -i <frame_%d.jpg> -f image2 <video.mpg|video.gif>
# To quickly extract a single frame from a video at time mm:ss and save it as a 128x128 resolution image:
@superkeyor
superkeyor / sqlite3-in-python.py
Created February 15, 2021 21:30 — forked from 7aman/sqlite3-in-python.py
sqlite3 cheatsheet for python 3
#!/usr/bin/env python3
'''
Thanks to Andres Torres
Source: https://www.pythoncentral.io/introduction-to-sqlite-in-python/
'''
import sqlite3
# Create a database in RAM
@superkeyor
superkeyor / write.Hmisc.SPSS.R
Created January 26, 2016 21:23 — forked from mrdwab/write.Hmisc.SPSS.R
Write an SPSS file from R with variable labels from the Hmisc package
write.Hmisc.SPSS = function(data, datafile, codefile) {
# EXAMPLE DATA (see: http://stackoverflow.com/q/10181730/1270695)
# df <- data.frame(id = c(1:6),
# p.code = c(1, 5, 4, NA, 0, 5),
# p.label = c('Optometrists', 'Nurses',
# 'Financial analysts', '<NA>',
# '0', 'Nurses'),
# foo = LETTERS[1:6])
# Add some variable labels using label from the Hmisc package
# require(Hmisc)
@superkeyor
superkeyor / DragHereToValidate.bat
Created September 27, 2015 03:16 — forked from radum/DragHereToValidate.bat
SublimeText 2 IBM SPSS Dimensions (build system, syntax higlight, snippets, etc)
:: If you want to use a batch file try this. Make a shortcut and drag n drop the file to be validated on it
Call "mrScriptCL.exe" "{path_to_mrs_validator}\ProjectValidator.mrs" /a:mddpath=%1
PAUSE
@superkeyor
superkeyor / covcheck_free.m
Created September 22, 2015 21:55 — forked from vsoch/covcheck_free.m
Coverage Checking for SPM Analysis
function covcheck_free()
% COVERAGE CHECKING for SPM ANALYSIS (covcheck_free.m)
% Vanessa Sochat
%
% This script takes in a list of subjects processed in SPM, an ROI mask
% that will be used for group analysis, and a user specified coverage
% percentage. It will calculate the size of a single subject mask and
% determine if the subject has that percentage coverage.
%__________________________________________________________________________
%