Skip to content

Instantly share code, notes, and snippets.

View samuelbezerrab's full-sized avatar

Samuel Bezerra samuelbezerrab

View GitHub Profile
@protrolium
protrolium / ffmpeg.md
Last active November 12, 2025 12:21
ffmpeg guide

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

You can get the list of installed codecs with:

var http = require('http');
var querystring = require('querystring');
var MailParser = require("mailparser").MailParser; // https://github.com/andris9/mailparser
var server = http.createServer();
server.addListener('request', function(req, res) {
var chunks = [];
req.on('data', chunks.push.bind(chunks));
req.on('end', function() {
var mailparser = new MailParser();
@my8bit
my8bit / stream.py
Created January 21, 2014 16:57
How to save youtube live stream. Python script which allows to save video by sequences
#!/usr/bin/python
# # # # # # # # # # # # # # # # # # # #
# #
# Script was made by Dennis #
# http://stefansundin.com/blog/452 #
# http://pastebin.com/8cw9LHFg #
# #
# # # # # # # # # # # # # # # # # # # #
@denji
denji / http-benchmark.md
Last active November 19, 2025 10:34
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
@paingpyi
paingpyi / Synchronous UIWebView
Created May 29, 2013 14:17
How to Synchronously get the Height of UIWebView
- (UIWebView*)createWebViewContent:(NSString*)content frame:(CGRect)frame
{
NSString * webContent = [NSString stringWithFormat:@"<html><head><meta name = \"viewport\" content = \"initial-scale = 1.0, user-scalable = no\"><style type='text/css'> body {color:black; margin:0 0 0 7pt; font-family: %@ !important; font-size:13; background-color: transparent;} .label{color:red} </style></head><body face=\"Bookman Old Style, Book Antiqua, Garamond\" size=\"5\"><div>%@</div></body></html>",WEBVIEW_FONT,content];
UIWebView *webView = [[UIWebView alloc] initWithFrame:frame];
webView.delegate = self;
webView.tag = 444;
webView.backgroundColor = [UIColor clearColor];
[webView loadHTMLString:webContent baseURL:nil];
@Neil-Smithline
Neil-Smithline / idletime.sh
Created March 18, 2012 15:33
Mac OS X Idle Time Shell Script
#!/bin/sh
# Get MacOSX idletime. Shamelessly stolen from http://bit.ly/yVhc5H
/usr/sbin/ioreg -c IOHIDSystem | /usr/bin/awk '/HIDIdleTime/ {print int($NF/1000000000); exit}'