sox
, node
On Ubuntu/Debian:
sudo apt install sox nodejs
On macOS:
(function(send) { | |
XMLHttpRequest.prototype.send = function () { | |
var callback = this.onreadystatechange | |
this.onreadystatechange = function() { | |
if (this.readyState == 4) { | |
var responseURL = this.responseURL | |
if (responseURL.match(/https?:\/\/www\.youtube\.com\/watch\?v=.*/g)) { | |
console.log(responseURL) | |
} | |
} |
'use strict' | |
const axios = require('axios') | |
const PORT = 4380 | |
const DEFAULT_RETURN_ON = ['login', 'logout', 'play', 'pause', 'error', 'ap'] | |
// Must use capitalized header | |
const ORIGIN_HEADER = { 'Origin': 'https://open.spotify.com' } |
'use strict' | |
const cheerio = require('cheerio') | |
const request = require('superagent') | |
const inacap = (jar = []) => { | |
const urls = { | |
login: 'https://adfs.inacap.cl/adfs/ls', | |
notas: 'https://siga3.inacap.cl/siga/portal_nl/alumnos/mis_notas/ajax_notas_alumno.asp', | |
horario: 'https://siga3.inacap.cl/Inacap.Siga.Horarios/Horario.aspx?SESI_CCOD=', |
{ | |
"main": "recorder.js", | |
"dependencies": { | |
"fs-extra": "^0.24.0", | |
"request": "^2.61.0" | |
} | |
} |
import gpio from 'gpio'; | |
export default const sensor = (pins = [ | |
{ num: 3, name: 'gate' }, | |
{ num: 4, name: 'door' } | |
]) => { | |
let sensors = []; | |
const init = () => { | |
pins.map(pin => { |
'use strict' | |
const fs = require('fs-extra') | |
const spawn = require('child_process').spawn | |
const originalPath = __dirname + '/pdfs/original' | |
const extractedPath = __dirname + '/pdfs/extracted' | |
fs.removeSync(extractedPath) | |
fs.copySync(originalPath, extractedPath) |
'use strict' | |
const fetch = require('node-fetch') | |
const TelegramBot = require('node-telegram-bot-api') | |
const bot = new TelegramBot(process.env.TELEGRAM_TOKEN, { polling: true }) | |
const low = require('lowdb') | |
const fileAsync = require('lowdb/lib/file-async') | |
const db = low(`${__dirname}/data/db.json`, { storage: fileAsync }) |
function sshtmux | |
ssh $argv -t 'tmux -CC a || tmux -CC' | |
end | |
function flushdns | |
sudo killall -HUP mDNSResponder | |
end | |
function tgfiles --description "tgfiles - will toggle hidden files and folders" | |
set showFiles "YES" |
/opt/vc/bin/raspivid -vf -hf -ih -t 0 -ISO 800 -ex night -w 720 -h 405 -fps 24 -b 1000000 -o - | tee output_original.h264 | ffmpeg -re -i - -codec:v libx264 -profile:v baseline -preset ultrafast -b:v 64k -maxrate 64k -bufsize 64k -vf scale=320:240 output_file.mp4 -y | |
/opt/vc/bin/raspivid \ | |
-vf -hf -ih -t 0 -ISO 800 -ex night \ | |
-w 720 -h 405 -fps 24 -b 1000000 -o - | \ | |
gst-launch-1.0 -v fdsrc \ | |
! h264parse \ | |
! omxh264dec \ | |
! omxh264enc \ | |
! rtph264pay \ |