Skip to content

Instantly share code, notes, and snippets.

View sposmen's full-sized avatar
😀

Jaime Giraldo sposmen

😀
View GitHub Profile
@sposmen
sposmen / gist:08f36b3de8f3469e0e4c2bd8ab14200b
Last active May 4, 2020 22:04
FFMpeg Image and Audio to Video
ffmpeg installation working in Mac Catalina
brew tap varenc/ffmpeg
brew tap-pin varenc/ffmpeg
brew install ffmpeg $(brew options ffmpeg --compact)
ffmpeg -loop 1 -i Lo\ que\ Aprendí.png -c:v libx264 -t 73 -pix_fmt yuv420p -vf scale=1280:720 Lo\ que\ Aprendí.mp4
ffmpeg -i Lo\ que\ Aprendí.mp4 -i Lo\ que\ Aprendí.mp3 Lo\ que\ Aprendí.mkv -c copy
@sposmen
sposmen / convert.sh
Created November 25, 2019 20:48
This small script is to memoize a fast convertion of ffmpeg
#!/usr/bin/env bash
for i in *.MP4;
do name=`echo $i | cut -d'.' -f1`;
FILE="small/${name}_small.MP4"
if [ -f "$FILE" ]; then
echo "$FILE exist"
else
echo "$FILE does not exist. Creating..."
ffmpeg -i "$i" "${FILE}";
@sposmen
sposmen / Flatten.rb
Last active August 6, 2019 20:27
Flatten example
data_array = [[1,2,[3]],4]
def manual_flatten(arr)
new_array = []
arr.each do |elm|
if elm.kind_of?(Array)
new_array.concat(manual_flatten(elm))
else
new_array << elm
end
@sposmen
sposmen / Claro Tecnicolor TC8305C.md
Last active December 10, 2024 11:37
Claro Tecnicolor TC8305C
@sposmen
sposmen / README.md
Last active October 31, 2018 19:42
Git clone only an specific directory

Usage

git_clone_only_dir -g <GIT_REPO> -d [-s <CLONE_DIR>] [-h] -- clone a specific git repository directory

where:
-g git repository
-d directory to clone
-s directory to place the clone (default will be a random one)
-h show this help text

@sposmen
sposmen / deploy.rb
Created June 7, 2018 20:46 — forked from markoa/deploy.rb
Ingredients to monitor Resque with God automatically via Capistrano (on Ubuntu)
namespace :deploy do
desc "Hot-reload God configuration for the Resque worker"
task :reload_god_config do
sudo "god stop resque"
sudo "god load #{File.join(deploy_to, 'current', 'config', 'resque-' + rails_env + '.god')}"
sudo "god start resque"
end
end
# append to the bottom:

How to USE

This is a helper to download the frontendmasters videos when you have full access to a course.

  1. Run in Chrome Developer tools console the VideoObserver.js in the frontendmasters page when you start the first video of the course you want to download

This step will start all videos through browser collecting their download urls and the Names of each video. When finish it will print the ulr's list and the Names

  1. With JDownloader (preferible) preconfigured to download one file at a time, to avoid throttling restrictions, download the
@sposmen
sposmen / FilterItem.vue
Created December 4, 2017 12:20
Vue filter Parent and Child
<template>
<label :class="{ active: anySelected }">
{{item.name}}
<input type="checkbox" v-model="anySelected" name="filter" :value="item.id" v-on:click="refresh()">
</label>
</template>
<script>
export default {
props: ['itemData'],
@sposmen
sposmen / readme.md
Created November 18, 2017 13:10
Angular from Zero to Hero

🌟 Angular from Zero to Hero 🌟

1. Instala Node, NPM y el Angular CLI 🔌

  • Utiliza la última versión de Node asegúrate de usar la versión 6.9.0 o mayor.
  • Instala NPM (generalmente viene con Node, así que no te preocupes) 😙
  • Instala Angular CLI globalmente:
    • $ npm install @angular/cli -g

2. Verifica 📋

@sposmen
sposmen / FFmpeg Commands.md
Last active July 13, 2018 15:48
FFMPEG batch process from m4a to mp3

Size to 720 and audio to 128k

ffmpeg -i INPUT.mp4 -vf scale=-1:720 -c:v libx264 -crf 18 -preset veryslow -b:a 128k OUTPUT.mkv