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
import { execSync } from 'node:child_process' | |
// Function to execute a shell command and return the output | |
function execCommand(command) { | |
return execSync(command, { encoding: 'utf-8' }) | |
} | |
// List all installed Node.js versions | |
const installedVersions = execCommand('. ~/.nvm/nvm.sh && nvm ls --no-colors') | |
.split('\n') |
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
$env:DEBUG="hubot:*" |
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
#!/usr/bin/env bash | |
ffmpeg -i /Users/joeyguerra/Desktop/Screen\ Recording\ 2024-01-10\ at\ 1.37.01 PM.mov -vf "fps=10,scale=640:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 out.gif |
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
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0 |
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
using StackExchange.Redis; | |
namespace Shipment; | |
public class StreamListener | |
{ | |
private readonly ConnectionMultiplexer _multiplexer; | |
private string _consumerGroupName; | |
public StreamListener(ConnectionMultiplexer multiplexer, string consumerGroupName) |
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
using MongoDB.Bson; | |
public static class BsonDocumentExtentions | |
{ | |
public static void RemoveNullElements(this BsonDocument documents) | |
{ | |
RemoveNulls(documents); | |
} | |
public static BsonDocument RemoveNulls(BsonDocument document) | |
{ |
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
import { fileURLToPath } from 'url' | |
const dirName = fileURLToPath(import.meta.url).replace('/bin/hubot.mjs', '') |
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
git daemon --verbose --export-all --base-path=. --reuseaddr |
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
gitlab-runner exec docker test-services |
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
import assert from 'assert'; | |
describe('Debounce', ()=>{ | |
it('When called super fast, then should only increment once', done=>{ | |
const debounce = timer => (fn, timeout) => { | |
clearTimeout(timer); | |
timer = setTimeout(fn, timeout); | |
return timer; | |
}; | |
let timer = null | |
let actual = 0; |
NewerOlder