Skip to content

Instantly share code, notes, and snippets.

@ignisf
ignisf / gist:ed4691de467e6125fa1f77d915b3d3cd
Last active December 7, 2022 09:36
Tasmota Nedis WIFIDW10WT
@steven2358
steven2358 / ffmpeg.md
Last active July 22, 2024 08:40
FFmpeg cheat sheet
/**
* Script to locate error nodes from solr error report, and do something with them.
*
* @author Younes Regaieg <y.regaieg@gmail.com>
* @version 1.0
**/
//----- Solr error report to be fetched from solr /solr4/alfresco/query?q=EXCEPTIONMESSAGE:*&wt=json&rows=<number-of-rows-to-fetch>
//----- Swap this dummy object with a real object from the output of the endpoint mentionned above.
var solrErrorsReport = {
SELECT count(alf_node.id)
FROM alf_node INNER JOIN alf_node_aspects ON alf_node.id = alf_node_aspects.node_id
WHERE alf_node.store_id = 6
AND alf_node_aspects.qname_id = 2929;
@ericgj
ericgj / f.py
Last active June 18, 2018 09:41
simple tagged union type matching in python
"""
Derived from [fn.py](https://github.com/kachayev/fn.py) function 'curried'
Amended to fix wrapping error: cf. https://github.com/kachayev/fn.py/pull/75
Copyright 2013 Alexey Kachayev
Under the Apache License, Version 2.0
http://www.apache.org/licenses/LICENSE-2.0
"""
@khoin
khoin / player.js
Created January 3, 2015 15:41
Here's a working HTML5 player.
/**
var data = [
{
src : "http://path/to/audio/play.mp3",
meta : {
artist: "Inexistence",
title: "UndeFINEd",
bpm: 120.0
}
},
@unixmonkey
unixmonkey / pre-commit
Last active August 1, 2018 20:34
git pre-commit hook to prevent check-in of debugger stuff
#!/usr/bin/env ruby
# This pre-commit hook aims to prevent you from *accidentally* committing debugger
# statements if installed in your project. You can force a commit if necessary with:
# `git commit --no-verify`.
# Install by copying it to <your-project-dir>/.git/hooks/pre-commit'
hits = []
rb_debuggers = ['binding\.pry', 'binding\.remote_pry', 'debugger', 'focus: true', ':focus => true', 'save_and_open_page', 'save_and_open_screenshot']
js_debuggers = ['console\.log', 'debugger']