Skip to content

Instantly share code, notes, and snippets.

Christian Ferrier xioustic

Block or report user

Report or block xioustic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@xioustic
xioustic / sort_views_per_day.js
Created Apr 5, 2019
Stardew Valley Forum Sort By Views per Day
View sort_views_per_day.js
(() => {
let listItemsElem = document.querySelector('.discussionListItems')
let listItems = [...listItemsElem.querySelectorAll('.discussionListItem')]
listItems = listItems.map(listItem => {
let elems = {}
elems.listItem = listItem
elems.date = listItem.querySelector('.DateTime')
elems.replies = listItem.querySelector('.stats .major dd')
elems.views = listItem.querySelector('.stats .minor dd')
View myanimelist_recommendation_accumulator.js
// this script is meant to be pasted into a MyAnimeList Anime page console
// it will accumulate the total number of recommendations for each recommendation
// it will copy this to clipboard to be pasted into another page
// then paste the script again to accumulate that page's recommendations
// and so on...
if (typeof totals === 'undefined') totals = {}
Array.from(document.querySelectorAll('.fs10'))
.map(i=>i.parentNode)
.map(e => {
View ping_alert.sh
#!/bin/bash
# requires 'sox' package for 'play'
# alarm parameters
ALARM_DURATION=.8
SINE_LOW=300
SINE_HIGH=3000
# target IP to watch
@xioustic
xioustic / README.md
Last active Jun 29, 2018
Benchmarking FFMpeg Piped to VLC for Periscope Streams (HLS) on Windows
View README.md

What is This

I wanted to pipe ffmpeg output to VLC on Windows which took a little while to figure out. ffmpeg cannot detect what format to use when piping, so I went through some obvious options but it was unclear what was best. So I wrote an extremely naive benchmarking script that would run a common stream for two minutes and then take the CPU/Memory usage data from tasklist /v before killing the two processes.

System Info

system

Proc: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz  3.39GHz
View mavericklabel_asset_tags_incremental_price_quote.js
// MaverickLabel Asset Tags Incremental Price Quote
// https://www.mavericklabel.com/products/asset-tags-price.html
// incrementally increases quantity for a quote
// when stopped, prints csv output
var gather, STOP
function start_iteration() {
STOP = 0
var gather = []
var old_price = false
@xioustic
xioustic / selfcrypted.sh
Created Jun 16, 2018
self encrypted bash script
View selfcrypted.sh
# gets the line number in this script of the "PAYLOAD:" line
echoPayloadLinenum() {
echo $(grep --text --line-number '^PAYLOAD:$' $0 | cut -d ':' -f 1)
}
# prints only the payload
echoPayload() {
local payload_linenum=$(echoPayloadLinenum)
local crypted_linenum=$((payload_linenum + 1))
@xioustic
xioustic / google_maps_timeline_to_csv.js
Last active Feb 19, 2018
think it's good to go...
View google_maps_timeline_to_csv.js
// hello
// i need to do taxes and i have to log my mileage retroactively
// my accountant said google timeline is fine
// google timeline is slow to iterate through by hand
// it's also slow to log by hand
// this script handles enough that i can put it in a csv file and work on it from there
var STOP_DATE = '2017-01-01'
var DEBUG = false
View keybase.md

Keybase proof

I hereby claim:

  • I am xioustic on github.
  • I am xioustic (https://keybase.io/xioustic) on keybase.
  • I have a public key ASBdkzgaeGYJyIthtHJ6u6kQ4Bbwo6aYonOQHAJAIdwy7Qo

To claim this, I am signing this object:

View tpb_searchjson.js
qsaArr = (el, query) => Array.prototype.slice.call(el.querySelectorAll(query))
qsArr = (el, query) => Array.prototype.slice.call(el.querySelector(query))
var results = qsaArr(document, '#main-content > #searchResult > tbody > tr');
var resultsJson = results.map((r) => {
let obj = {}
obj.el = r
obj.name = r.querySelector('.detName').textContent.trim()
obj.category = r.querySelector('.vertTh').textContent.trim()
obj.magnet = qsaArr(r, 'td > a').map(e => e.href)[0]
@xioustic
xioustic / subl.bat
Last active May 4, 2017
subl terminal alias for windows
View subl.bat
REM Place this somewhere on your PATH
@echo off
"C:\PATH\TO\Sublime Text\sublime_text.exe" %*
You can’t perform that action at this time.