Skip to content

Instantly share code, notes, and snippets.

View alocus's full-sized avatar

Michael C. D alocus

View GitHub Profile
@alocus
alocus / ffmpeg last frame video
Created September 14, 2017 19:46 — forked from samelie/ffmpeg last frame video
ffmpeg last frame of video
#!/bin/bash
fn="$1"
of=`echo $1 | sed s/mp4/jpg/`
lf=`ffprobe -show_streams "$fn" 2> /dev/null | grep nb_frames | head -1 | cut -d \= -f 2`
rm -f "$of"
let "lf = $lf - 1"
ffmpeg -i $fn -vf select=\'eq\(n,$lf\) -vframes 1 $of
@alocus
alocus / _my_note.md
Last active October 24, 2018 07:27 — forked from rosswd/multi-git-win.md
Setting up a Github and Bitbucket account on the same computer on Mac OS. Now with a guide for Windows 10.

How I set up bitbucket and github on the same computer

I always create new repo on github and bitbucket online and clone it locally.

  • Follow github and bitbucket ssh setup procedure (except the fact saving the file with different name id_rsa_XXXXX) ++ Generate ssh key on machine and add them to the account

Mac

Set up ssh config for separate repo hosts

~/.ssh/config

@alocus
alocus / json2cvs.py
Created December 22, 2022 16:03
Python: Covert nested json to cvs
import sys
import os
import json
from copy import deepcopy
import pandas
# Stackoverflow
# https://stackoverflow.com/questions/41180960/convert-nested-json-to-csv-file-in-python/63500540#63500540
# Usage:
# python j2c.py input.json
@alocus
alocus / crawl_recursive_internal_links.py
Last active May 8, 2025 02:08
Crawl recursive internal links with Crawl4AI