Skip to content

Instantly share code, notes, and snippets.

@ErykDarnowski
ErykDarnowski / README.md
Last active March 8, 2025 06:21
How to automatically mount a network Samba share on Arch Linux!

How to automatically mount a network Samba share on Arch Linux!

  1. Install the [cifs-utils][1] package: sudo pacman –S cifs-utils.
  2. Make a mount folder for the SMB share: sudo mkdir /mnt/<Path>.
  3. Create a backup of the [fstab][2] file (just in case): sudo cp /etc/fstab /etc/fstab_backup.
  4. Open the [fstab][2] file in your favorite editor: sudo vim /etc/fstab.
  5. Add the mount line: //<Server_address>/<Server_share_and_internal_path> /mnt/<Path> cifs username=<Server_user>,pass=<Server_password> 0 0.
  1. Save the file.
  2. Reload [fstab][2]: sudo mount -av.
@mikoim
mikoim / README.md
Last active November 25, 2024 14:00
[Updated! Aug 14 2020] YouTube recommended encoding settings on ffmpeg (+ libx264)

Parameters

Container: MP4

Parameter YouTube recommends setting
-movflags faststart moov atom at the front of the file (Fast Start)

Video codec: H.264

@datagrok
datagrok / README.md
Last active February 24, 2025 09:53
What happens when you cancel a Jenkins job

When you cancel a Jenkins job

Unfinished draft; do not use until this notice is removed.

We were seeing some unexpected behavior in the processes that Jenkins launches when the Jenkins user clicks "cancel" on their job. Unexpected behaviors like:

  • apparently stale lockfiles and pidfiles
  • overlapping processes
  • jobs apparently ending without performing cleanup tasks
  • jobs continuing to run after being reported "aborted"
@olasd
olasd / stream_to_youtube.sh
Created March 28, 2014 19:58
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
@soarez
soarez / ca.md
Last active March 8, 2025 21:38
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@jedy
jedy / go_scp.go
Last active May 31, 2022 07:20
an example of scp in golang
// https://blogs.oracle.com/janp/entry/how_the_scp_protocol_works
package main
import (
"fmt"
"golang.org/x/crypto/ssh"
)
const privateKey = `content of id_rsa`
@takinbo
takinbo / paginated_collection.js
Created July 25, 2011 21:57 — forked from io41/paginated_collection.js
Pagination with Backbone.js & django-tastypie
// includes bindings for fetching/fetched
var PaginatedCollection = Backbone.Collection.extend({
initialize: function() {
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage', 'filtrate', 'sort_by');
typeof(options) != 'undefined' || (options = {});
typeof(this.limit) != 'undefined' || (this.limit = 20);
typeof(this.offset) != 'undefined' || (this.offset = 0);
typeof(this.filter_options) != 'undefined' || (this.filter_options = {});
typeof(this.sort_field) != 'undefined' || (this.sort_field = '');