Skip to content

Instantly share code, notes, and snippets.

@pastleo
pastleo / git_action_set_tutor.md
Last active August 27, 2016 15:11
My Git Action Sets & Tutorials

My Git Action Sets & Tutorial

Init the git repo

  • git clone <url> [path]
  • git init

Trouble-Free Actions

@vi
vi / split_by_silence.sh
Last active February 23, 2024 13:18
Using FFmpeg to split multimedia file into parts based on audio volume level
#!/bin/bash
IN=$1
OUT=$2
true ${SD_PARAMS:="-55dB:d=0.3"};
true ${MIN_FRAGMENT_DURATION:="20"};
export MIN_FRAGMENT_DURATION
if [ -z "$OUT" ]; then
@crashtech
crashtech / RoR, from MVC to GraphQL.md
Last active May 29, 2023 22:42
RoR, from MVC to GraphQL

Ruby on Rails, from MVC to GraphQL

As a Ruby on Rails developer, I'm always looking for the best tools and practices to apply to my day-to-day development. This framework has a fantastic structure where all its inner parts communicate very well. But, as applications start growing, or developers want to start using more modern technologies, several things start getting out of control.

Recent versions of Rails implemented Webpack, facilitating the use of modern JavaScript frameworks, which added another level of robustness to everyone's applications. Not only is this becoming the new standard, but it also enables bigger code-bases without falling into madness.

Facebook, as the creator of ReactJS (one of these modern JS frameworks and the most popular one) introduced to the world another of its technologies, GraphQL. This tool, like any other tool, can be a great asset, as long as it's in the right hands, meaning that you first need to know what role it plays before exploring how to use it in your RoR appli