Skip to content

Instantly share code, notes, and snippets.

View msis's full-sized avatar
Building The Future of Maritime

Mohamed Saad Ibn Seddik msis

Building The Future of Maritime
View GitHub Profile
@msis
msis / update_org_github.bash
Created May 31, 2023 14:53
Update org name of local git repos
#!/bin/bash
# variables
old_organization_name="old_organization_name"
new_organization_name="new_organization_name"
parent_dir="$HOME/projects"
# iterate over all directories
for dir in "$parent_dir"/*/
do
@msis
msis / README.md
Created September 16, 2020 20:38
Toggle .DS_Strore files
  1. To disable the file creation: defaults write com.apple.desktopservices DSDontWriteNetworkStores true

  2. To enable the file creation: defaults write com.apple.desktopservices DSDontWriteNetworkStores false

A restart is required for changes to take effect.

@msis
msis / parallel_rsync.sh
Created April 28, 2020 10:39
lists recursively all files in SOURCE and parallel rsync them to DESTINATION
find $SOURCE -type f | xargs -n1 -P4 -I% rsync -ahPv % $DESTINATION

Keybase proof

I hereby claim:

  • I am msis on github.
  • I am msis (https://keybase.io/msis) on keybase.
  • I have a public key ASBZJq2TgOf1QhpCevN0y80xAFS4_1EhJKfAlUlmM_cIWQo

To claim this, I am signing this object:

@msis
msis / ffmpeg-web-video-guide.md
Last active March 9, 2019 23:56 — forked from jaydenseric/ffmpeg-web-video-guide.md
A quick guide to using FFmpeg to create cross-device web videos.

Video conversion with FFmpeg

Command basics

Most basic conversion using Terminal: ffmpeg -i input.mov output.webm.

Strip audio

Flag: -an.

@msis
msis / gist:b63b9a5c505e321d567d0f8a6051866f
Created August 12, 2018 19:47
[Create new environment for jupyter notebook]
python -m ipykernel install --user --name=XXX
@msis
msis / import_images_dir.py
Created July 19, 2018 20:16
import video sliced directories to beaverdam
from django.core.management.base import BaseCommand, CommandError
from annotator.models import Video
import os
import json
import re
import os
import shutil
# referring to https://stackoverflow.com/questions/5967500/how-to-correctly-sort-a-string-with-a-number-inside for "human sorting"
def atoi(text):
@msis
msis / rc.local
Last active March 7, 2018 12:11
[Record gpsd data at startup]
# things
gpsd -G -n /dev/ttyUSB0
gpspipe -d -r -t -o /home/user/`date -Iminutes`.nmea
# rest of the things
# always end with `exit 0`
@msis
msis / install_nvidia_dependencies.md
Last active September 27, 2019 15:03
[setting up tensorflow-gpu] Step-by-step install for tensorflow-gpu #deeplearning #nvidia #shell #machinelearning #ai

Install nvidia repo packages:

  1. Download nvidia machine learning repo package:
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb
  1. Install that package:
sudo dpkg -i nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb
@msis
msis / ffmpeg_utils.md
Last active February 4, 2018 22:57
[Notes on ffmpeg] #ffmpeg #h264 #fps #mp4

Extract frames from video source

ffmpeg -i myvideo.mp4 -vf fps=4 frm%06d.jpg

Change frame rate of h264 video source

ffmpeg -y -i source.mp4 -r 25 -c:v libx264 -b:v 3M -strict -2 -movflags faststart destination.mp4