Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View s-leroux's full-sized avatar

Sylvain Leroux s-leroux

View GitHub Profile
@s-leroux
s-leroux / resource.md
Last active May 26, 2022 21:14
A list of resources to practice "copywork" for technical writers

What is "copywork"?

Copywork is a technique to practice writing by copying parts of text from authors you admire. It is not plagiarisme since you only copy fragment of text, and you do not publish these copies. It's an exercise aiming at training your brain to see writing as a no-pressure practice. It makes you in position of thinking and writing like someone you like. It also force your mind to take attention and interiorize the small details of structure, style, vocabulary and text articulation that makes a great writing.

Read more about copywork here:

The resources below were choosen for the excellence of their writing, their style and vocabulary, regardless of the technical quality of the content. Since the goal here is to improve our writing skills, native English writers are

@s-leroux
s-leroux / Build.sh
Last active May 19, 2021 19:53
Build a CSV matrix showing versions of Asciidoctor that produce identical output
#!/bin/bash
#
# Usage:
# sudo Build [test-file.adoc] > result.csv
#
set -e
TESTFILE="${1:-test-file.adoc}" # the test file
@s-leroux
s-leroux / bin.sh
Created May 1, 2020 10:50
How to use recursion in Bash? Example: producing all {0..1} combinations of a given length.
#!/bin/bash
# Produces all {0..1} combinations of a given length
#
# This program is provided AS-IS with the sole purpose of
# demonstrating the use of functions and recursion in Bash
#
# Usage:
#
# sh$ ./bin.sh 3
# 000
#!/bin/sh
#
# Test several regex patterns against the characters in the ASCII printable range
# Related to https://twitter.com/freebsdfrau/status/1245253969447809024?s=20
#
seq 33 126 | awk '
BEGIN {
split("[-_[:alpha:]] [-[:alpha:]_] [_[:alpha:]-] [[:alpha:]_-]", tests, "[[:blank:]]+")
@s-leroux
s-leroux / uuoc-benchmark.sh
Created October 1, 2018 15:29
A quick and dirty script to compare performances between passing an input file as a `file parameter`, as a `redirection` or using an `useless cat`
DATAFILE="${HOME}/random.data"
SCRIPT="
{
/* simulate some processing */
for(i = 0; i < rand()*1000; ++i)
acc += i;
}
"
for n in {00..99}; do

Prepare

export OBS_USERNAME=M0ses

APPImage

Create new project

Create temporary config file

tweet.*.txt
tweet.*.yaml
xx*
EXAMPLE-*
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
@s-leroux
s-leroux / file
Last active April 22, 2024 05:10
AWK one-liners support file
CREDITS,EXPDATE,USER,GROUPS
99,01 jun 2018,sylvain,team:::admin
52,01 dec 2018,sonia,team
52,01 dec 2018,sonia,team
25,01 jan 2019,sonia,team
10,01 jan 2019,sylvain,team:::admin
8,12 jun 2018,öle,team:support
@s-leroux
s-leroux / gist:96f03bb171e00d049a044bd7a10e105a
Created April 22, 2018 09:53
Ardour region with curved fade in and fade out
<Region name="jg-032316-sfx-footsteps-casual-shoes-on-rocks.2" muted="0" opaque="1" locked="0" video-locked="0" automatic="0" whole-file="0" import="0" external="1" sync-marked="0" left-of-split="0" right-of-split="0" hidden="0" position-locked="0" valid-transients="0" start="90112" length="48835" position="96044" beat="4.0018333333333329" sync-position="0" ancestral-start="0" ancestral-length="0" stretch="1" shift="1" positional-lock-style="AudioTime" layering-index="0" envelope-active="0" default-fade-in="0" default-fade-out="0" fade-in-active="1" fade-out-active="1" scale-amplitude="1" id="4279" type="audio" first-edit="nothing" source-0="4247" source-1="4249" master-source-0="4247" master-source-1="4249" channels="2">
<Envelope default="yes"/>
<FadeIn>
<AutomationList automation-id="fadein" id="4280" interpolation-style="Curved" state="Off">
<events>0 1.0000000116860974e-07
1.9393939971923828 0.047581917240722742
3.8787879943847656 0.095056046128510166
5.8181819