Skip to content

Instantly share code, notes, and snippets.

View jrichardsz's full-sized avatar

JRichardsz jrichardsz

View GitHub Profile
@jrichardsz
jrichardsz / args_shell_parser-default.md
Last active April 14, 2024 21:36
bash argument parser, bashargument

foo.sh

#!/bin/bash

for ARGUMENT in "$@"
do
   KEY=$(echo $ARGUMENT | cut -f1 -d=)

 KEY_LENGTH=${#KEY}
@jrichardsz
jrichardsz / c# unit tests.cs
Created April 12, 2024 16:40
c# unit tests
using NUnit.Framework;
using System;
[TestFixture]
public class Tests
{
[Test]
public static void Test1()
{
Assert.AreEqual("emocleW", Kata.SpinWords("Welcome"));
@jrichardsz
jrichardsz / Helper.js
Created April 11, 2024 23:03
html table with javascript, array double to table html
function Helper() {
function getCells(data, type) {
return data.map(cell => `<${type} style="border: 1px solid #000;" >${cell}</${type}>`).join('');
}
function createBody(data) {
return data.map(row => `<tr style="border: 1px solid #000;" >${getCells(row, 'td')}</tr>`).join('');
}
this.generateTable = (data) => {
@jrichardsz
jrichardsz / ffmpeg flip mirror invert.md
Created July 10, 2022 20:26
ffmpeg flip mirror invert
@jrichardsz
jrichardsz / opera snippets
Created April 9, 2024 01:31
opera snippets
https://addons.opera.com/en/extensions/details/vertical-tabs/
@jrichardsz
jrichardsz / ffmpeg -fadein , fadeout.md
Last active April 6, 2024 15:45
ffmpeg snippets collection

image

Fade in first 15 seconds of audio:

afade=t=in:ss=0:d=15

Fade out last 25 seconds of a 900 seconds audio:

afade=t=out:st=875:d=25

@jrichardsz
jrichardsz / plantuml - flowchart.md
Last active April 3, 2024 17:25
plantuml snippets plantextuml uml diagram as code https://www.planttext.com real architect diagrams

image

@startuml

skin rose
title Flujo: 832651cfd080

start
@jrichardsz
jrichardsz / http server snippets - python.sh
Last active April 3, 2024 00:29
http server snippets
## python 2
```
cd folder
python -m SimpleHTTPServer 8080
```
## python 3
```
@jrichardsz
jrichardsz / github contributors template.md
Created April 1, 2024 15:31
github contributors template