Skip to content

Instantly share code, notes, and snippets.

@tayvano
tayvano / gist:6e2d456a9897f55025e25035478a3a50
Created February 19, 2017 05:29
complete list of ffmpeg flags / commands
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full.
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…
Getting help:
-h — print basic options
-h long — print more options
-h full — print all options (including all format and codec specific options, very long)
@barbietunnie
barbietunnie / udemy-courses-download-using-cookies.md
Last active June 12, 2025 07:04
Downloading Udemy videos with youtube-dl

How to download your Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
  3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.
$ youtube-dl {course_link} --cookies {path_to_cookies_file}
<?php
class Csv
{
public static function fromArray($rows, $delimiter = ',')
{
if (empty($rows)) {
return '';
}
@barryvdh
barryvdh / Xml.php
Last active January 14, 2021 09:10
XML Helper (from/to array)
<?php
use SimpleXMLElement;
class Xml {
/**
* @param array $data
* @param string $root
* @return SimpleXMLElement
@dantheman213
dantheman213 / export_db_structure.sh
Last active May 19, 2025 14:25
Batch backup and export your Postgres or PostgreSQL table schemas and stored functions or procedures into individual *.sql files --the easy way!
#!/bin/sh
# AUTHOR
# DANIEL E. GILLESPIE (2016)
# https://github.com/dantheman213
# DESCRIPTION
# Export your app's table schemas and stored functions from a PostgreSQL
# database into individual *.sql files for easy management and source control.
@wojteklu
wojteklu / clean_code.md
Last active September 5, 2025 16:56
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active August 31, 2025 05:46
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@jsleeio
jsleeio / akamai-curl.sh
Created January 8, 2016 03:32
curl wrapper for Akamai debugging
#!/bin/sh
usage() {
echo "usage: $0 [-s] [-v] [-L] [-h HTTPHOST] [-X HTTPMETHOD] URL"
exit 1
}
args=`getopt svLX:h: $*`
if [ $? != 0 ] ; then
usage
@KefDS
KefDS / referencia_git.md
Last active August 25, 2022 20:49
Referencia acerca de comandos y configuración git

Pequeña referencia acerca de Git y GitHub

Configurar Git

Configuración básica

	git config --global user.name "Usuario"				# Nombre de usuario
	git config --global user.email [email protected] 		# e-mail
@paulirish
paulirish / what-forces-layout.md
Last active August 28, 2025 15:03
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent