Skip to content

Instantly share code, notes, and snippets.

@oleng
oleng / [List] google drive or sheet related
Last active November 13, 2021 13:38
list for google API related
@oleng
oleng / ffmpeg_concat_demux.sh
Created March 10, 2021 01:44
Join several .mp4 or .mkv files (with same codecs) without reencoding/transcoding using concat demuxer in ffmpeg
# Use concat demuxer in ffmpeg to join .mp4 or .mkv in stream copy mode
# Wiki : https://trac.ffmpeg.org/wiki/Concatenate#demuxer
# Documentation : https://ffmpeg.org/ffmpeg-formats.html#concat
# flags used explained:
# `-safe` is for filename's safe mode. 0 is to disable, default -1
# `-i` input file (ordered list)
# `-map` option is used to choose which streams from the input(s) should be included in the output(s)
# For more complex usage see: https://trac.ffmpeg.org/wiki/Map & https://ffmpeg.org/ffmpeg.html#Advanced-options
# `-map 0:v` -> all video streams from input 0
@oleng
oleng / markdown_table_to_dict.py
Created September 26, 2020 04:04
Parse markdown formatted table in a file or string objects to a `dict` or save as json
def markdown_table_to_dict(strip_data=False, path=None, _str=None, io_txt=None, json_path=False):
'''
Convert markdown table to dict
:strip_data: `bool`
`True` will strip any markdown string formats in the table data that use these characters,
including anchor id links: `\`*_#~`.
Blockquotes, images, external links, and horizontal rule formatting will be left intact `⋅.:>[]-()!`
:path: `str` object, should contain valid POSIX path
:_str: `str` object
@oleng
oleng / userChrome.css
Last active February 12, 2019 07:54
userChrome.css (light theme) for Status bar - Firefox
/*
Status bar (classic browser) hack
# up to Firefox 60.5esr
# save in Firefox user profile folder: ~/Library/Application Support/Firefox/Profiles/<active.profile>/chrome/userChrome.css
# see r/FirefoxCSS pinned thread (https://redd.it/73dvty) for browser chrome's live edit & debugging
# see chrome://browser/content/browser.css
*/
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
@oleng
oleng / .ssh config
Last active December 2, 2019 00:39
~/.ssh/config
#### Specific definitions for each site, overwrites any general definitions ####
Host github.com
User username@email.com
#### General definitions at the bottom ####
Host *
UseKeychain yes
AddKeysToAgent yes
@oleng
oleng / virtualenvwrapper_setup.md
Last active August 27, 2018 01:13
How To Setup a Sane Virtualenvwrapper configurations
  1. After using pip to install virtualenvwrapper, put all virtualenvwrapper shell scripts together in the default pip site-packages folder. These are virtualenvwrapper_lazy.sh & virtualenvwrapper.sh in *nix flavors machines.

    For homebrewed pypy3, path is :

    /usr/local/Cellar/pypy3/6.0.0/libexec/site-packages/virtualenvwrapper.

  2. Then create a symlink of that folder in: /usr/local/share/{python_subset_version}/

    $ ln -s /usr/local/Cellar/pypy3/6.0.0/libexec/site-packages/virtualenvwrapper /usr/local/share/pypy3/virtualenvwrapper/
    
@oleng
oleng / bash-cheatsheet.sh
Created December 14, 2016 10:11 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04