Skip to content

Instantly share code, notes, and snippets.

View 4ov's full-sized avatar
🇪🇬

Mohammed 4ov

🇪🇬
View GitHub Profile
@dwbfox
dwbfox / jsyoutube.js
Created January 30, 2012 02:12
JS YouTube Download Userscript
// ==UserScript==
// @id www.youtube.com-2925af97-1b59-4d38-bc09-e2fff53f9d6a@defb5eb4-0168-463d-913b-8b4fbfa18502
// @name YouTube + MP3 Downloader
// @version 1.3.2.1
// @namespace defb5eb4-0168-463d-913b-8b4fbfa18502
// @author atmega
// @description Download YouTube videos with a single click of a button!
// @include http://www.youtube.com/watch?v=*
// @include http://www.youtube.com/watch?feature=*
// @run-at document-end
@madmo
madmo / gist:8548738
Created January 21, 2014 21:27
golang websocket over https proxy
func HttpConnect(proxy, url_ string) (io.ReadWriteCloser, error) {
p, err := net.Dial("tcp", proxy)
if err != nil {
return nil, err
}
turl, err := url.Parse(url_)
if err != nil {
return nil, err
}
Title Author Genre Height Publisher
Fundamentals of Wavelets Goswami, Jaideva signal_processing 228 Wiley
Data Smart Foreman, John data_science 235 Wiley
God Created the Integers Hawking, Stephen mathematics 197 Penguin
Superfreakonomics Dubner, Stephen economics 179 HarperCollins
Orientalism Said, Edward history 197 Penguin
Nature of Statistical Learning Theory, The Vapnik, Vladimir data_science 230 Springer
Integration of the Indian States Menon, V P history 217 Orient Blackswan
Drunkard's Walk, The Mlodinow, Leonard science 197 Penguin
Image Processing & Mathematical Morphology Shih, Frank signal_processing 241 CRC
@darrenscerri
darrenscerri / Middleware.js
Last active July 11, 2023 02:59
A very minimal Javascript (ES5 & ES6) Middleware Pattern Implementation
var Middleware = function() {};
Middleware.prototype.use = function(fn) {
var self = this;
this.go = (function(stack) {
return function(next) {
stack.call(self, function() {
fn.call(self, next.bind(self));
});
@teknoraver
teknoraver / unixhttpc.go
Last active March 21, 2024 11:48
HTTP over Unix domain sockets in golang
package main
import (
"context"
"flag"
"fmt"
"io"
"net"
"net/http"
"os"
@sebble
sebble / stars.sh
Last active May 17, 2024 20:59
List all starred repositories of a GitHub user.
#!/bin/bash
USER=${1:-sebble}
STARS=$(curl -sI https://api.github.com/users/$USER/starred?per_page=1|egrep '^Link'|egrep -o 'page=[0-9]+'|tail -1|cut -c6-)
PAGES=$((658/100+1))
echo You have $STARS starred repositories.
echo

Get/set ID3 meta tags using ffmpeg

A quick guide on how to read/write/modify ID3 metadata tags for audio / media files using ffmpeg.

FFmpeg has a free-form command line option that allows the user to specify key-value-pairs for encoding metadata. Let's take a look.

1. Read ID3 metadata

To list all global metadata tags for a media file, just set an input but no output file.

@sylvainleris
sylvainleris / MiddlewareES6.js
Last active March 16, 2023 12:42 — forked from darrenscerri/Middleware.js
A very minimal Javascript (ES5 & ES6) Middleware Pattern Implementation
class Middleware {
constructor() {
// Array prototype last
if (!Array.prototype.last) {
Array.prototype.last = function() {
return this[this.length - 1];
}
}
@aaangeletakis
aaangeletakis / How-To-Install-SDL-On-Ubuntu.md
Last active May 18, 2024 15:21
How do I install SDL on ubuntu?

What you need to do to install SDL is:

#install sdl2
sudo apt install libsdl2-dev libsdl2-2.0-0 -y;

#install sdl image  - if you want to display images
sudo apt install libjpeg-dev libwebp-dev libtiff5-dev libsdl2-image-dev libsdl2-image-2.0-0 -y;

#install sdl mixer  - if you want sound
@daz
daz / youtube-dl-to-mp3.sh
Last active June 26, 2022 22:00
youtube-dl pipe to ffmpeg for mp3 output one-liner
youtube-dl -f251 "[URL]" -o - | ffmpeg -i pipe: -strict -2 out.mp3