Skip to content

Instantly share code, notes, and snippets.

View stasgavrylov's full-sized avatar

Stas Gavrylov stasgavrylov

View GitHub Profile
@ekozhura
ekozhura / ffmpeg.md
Created October 12, 2019 11:12 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@blia
blia / proxy.md
Last active February 20, 2019 19:12

index.js

const express = require('express');
// $ npm i glob
const globSync   = require('glob').sync;

let app = express();

let proxies = globSync('./proxies/**/*.js', { cwd: __dirname }).map(require);
@A-gambit
A-gambit / ReactiveConf2017.md
Last active June 19, 2021 16:57
Proposal for lightning talk at ReactiveConf 2017: How do you make friends with React and FRP? 🤔 Start to develop your application using Focal.

How do you make friends with React and FRP? 🤔 Start to develop your application using Focal.

This is a CFP for the ⚡️Lightning⚡️ talk at awesome ReactiveConf 2017. If you'd like to see this talk, please 🌟 star🌟 this summary and retweet my tweet 🙂 #ReactiveConf

image

Functional reactive programming (FRP) is very popular nowadays. The JavaScript community provides us with excellent tools like RxJS, Bacon, and Kefir. But, as we know, they have nothing to do with React. So how we can use the power of FRP in our React application? Using the correct state management, we can make friends with FRP and React and make our application truly reactive. In my lightning talk, I will talk about Focal

@ALF-er
ALF-er / ReactConf2017.md
Last active June 19, 2021 20:09
My review of speeches at React Conf 2017

Disclaimer: Многие доклады смотрелись и отчёты писались в поезде, спать хотелось капец.

Disclaimer 2: Если что, простите за орфорграфию.

Вступление, в основном - нудное бла, бла, бла. Из достижений - 547,138 ReactDevTools installed on Chrome. Тем кто териториально недалеко от San Francisco Bay Area может быть интересно, что FB проводит открытые митапы - ReactWednesday.

Докладчик харизматичный, слушать его приятно.

onSearchSuccess = (places) => {
const changeHeader = (num, callback) => {
const header = { formHeader: `We Found ${num} Local Caregivers` };
this.setState(
...(callback ? [header, callback] : [header])
);
};
Array.isArray(places) && (
places.reduceRight((acc, place, index) =>
@wojteklu
wojteklu / clean_code.md
Last active July 24, 2024 12:04
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

@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing
@sudodoki
sudodoki / Angular-outsideEvents.md
Last active February 15, 2017 15:17
jQuery outside events wrapper for Angular JS

jQuery outside events wrapper for Angular js.

In case you are willing to use jquery outside events plugin by @cowboy with Angular JS, and don't want to get your hands dirty, try this wrapper.
It defines oc-clickoutside, oc-dblclickoutside, oc-mouseoveroustide, oc-focusoutside directives you can use in your code.
In order to use with amd, don't forget to set path for outsideEvents.js and its dependency jQuery.
use just like you

 <popup oc-clickoutside="hidePopup()">Your awesome popup content.</popup>

In case you don't need amd, just strip out the define(['angular', 'outsideEvents'],function(angular){...}) part. Don't forget to load module while initializing your own.

@hsablonniere
hsablonniere / README.md
Created May 2, 2012 22:42
scrollIntoViewIfNeeded 4 everyone!!!

scrollIntoViewIfNeeded 4 everyone!!!

This gist provides a simple JavaScript implementation of the non-standard WebKit method scrollIntoViewIfNeeded that can be called on DOM elements.

Usage

Just use the code in index.js in your app or website. You can see usage in the test page test.html.

The parent element will only scroll if the element being called is out of the view. The boolean can force the element to be centered in the scrolling area.