This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function filesFromTarball(pkg, logger, omitDependencies) { | |
const all = await decompress(`${pkg.name.replace('/', '-').replace(/^@/, '')}-${pkg.version}.tgz`); | |
logger.log(`Extracted compiled package from ${pkg.name}-${pkg.version}.tgz`); | |
let wanted = all; | |
if (omitDependencies) { | |
wanted = all.filter((f) => !f.path.startsWith('package/node_modules')); | |
} | |
const files = wanted.map(({ data, path }) => ({ data, path: path.replace(/^package\//, '') })); | |
logger.log(`Got ${files.length} local files`); | |
return files; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const crypto = require('crypto'); | |
var md5 = require('md5'); | |
/** | |
* @file | |
* Secure password hashing functions for user authentication. | |
* | |
* Based on the Portable PHP password hashing framework. | |
* @see http://www.openwall.com/phpass/ | |
* | |
* An alternative or custom version of this password hashing API may be |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# get the current set of questions | |
curl 'https://eu-api.jotform.com/form/200321541644039/questions?apiKey='$JOT_API_KEY|jq . > new_boat.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
div.b { | |
clip-path: inset(50px 20px 300px 30px); | |
} | |
div.a { | |
font-family: Sans-Serif; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript" | |
src="//www.gstatic.com/cast/sdk/libs/caf_receiver/v3/cast_receiver_framework.js"> | |
</script> | |
</head> | |
<body> | |
<cast-media-player id="player"></cast-media-player> | |
<script> | |
const context = cast.framework.CastReceiverContext.getInstance(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export GST_DEBUG=GST_CAPS:5 | |
gst-launch-1.0 filesrc location=src/test/resources/test.wav ! wavparse ! wavenc ! filesink location=test.wav | |
Setting pipeline to PAUSED ... | |
Pipeline is PREROLLING ... | |
Pipeline is PREROLLED ... | |
Setting pipeline to PLAYING ... | |
New clock: GstSystemClock | |
Got EOS from element "pipeline0". | |
Execution ended after 0:00:00.004597758 | |
Setting pipeline to PAUSED ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<script> | |
function init() { | |
var form = document.getElementById('f'); | |
if(form) { | |
form.addEventListener('submit', function(event) { | |
if(form.ajax.checked) { | |
var formData = new FormData(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Monitor a directory for files older than a specified number of seconds | |
# Usage example: tclsh monitordir.tcl \\fgbsamfvcs1n42\N42_Ex18_PremBulltoFM\bbc_minute 120 | |
proc monitordir {path max_age} { | |
if {![file isdirectory $path]} { | |
puts stderr "$path not found or is not a directory" | |
exit 1 | |
} | |
set files [glob -nocomplain -directory $path *] | |
# if the folder is empty all is OK |