Skip to content

Instantly share code, notes, and snippets.

Avatar

Héctor Ramos hramos

View GitHub Profile
@hramos
hramos / ffmpeg.md
Created Aug 14, 2019 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files
View ffmpeg.md

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:

@hramos
hramos / Armor.h
Created Jul 26, 2016
PFSubclassing Properties & Methods
View Armor.h
@interface Armor : PFObject<PFSubclassing>
@property (nonatomic, strong) NSString *displayName;
@end
@hramos
hramos / Armor.h
Created Jul 26, 2016
Subclassing PFObject
View Armor.h
@interface Armor : PFObject<PFSubclassing>
+ (NSString *)parseClassName;
@end
View parse_ebooks.log
This file has been truncated, but you can view the full file.
Tweeted: For more structured data was saved, like find it is
Tweeted: for a point with PFQuery queryWithClassName@"Player"; lotsOfWins whereKey@"wins" lessThanOrEqualToNSNumber numberWithInt50; If you apply to
Tweeted: of invalid installations. That is then using the Error Messages When asked to enable access will
Tweeted: method application files productIdentifier the current user accounts might want to handle loading message board. For
Tweeted: the network. If you can remove your class Roles provide a new data about filename collisions.
Tweeted: multiple types of the cache. You can create a "Team Agent", and set to five certificates,
Tweeted: *user, NSError *error) { if (error) { NSLog(@"Everything went fine!"); } blockscallbacks You can be persisted
Tweeted: ID"; In addition, developers can be nil forKey@"skills"; gameScore setObjectNSNumber numberWithInt1337 forKey@"score"; gameScore saveEventua
Tweeted: should be displayed when your validation of user query the current user is offline or failure
@hramos
hramos / alexa-skills.controller.js
Last active Nov 14, 2015
node-sonos-http-api client for Parse Cloud Code
View alexa-skills.controller.js
'use strict';
// controllers/alexa-skills.controller.js
// Based on https://github.com/mattwelch/alexa-sonos/blob/master/sonos.controller.js
// Adapted to use sonos-client.js
// Reference implementation for Alexa Skills Kit service.
// https://developer.amazon.com/edw/home.html#/skills
@hramos
hramos / README.md
Last active Dec 19, 2015
A middleware module for logging in a Parse.User using Facebook in express.
View README.md

Parse Cloud Module for managing Facebook Login server side using Express.

To log in, visit https://YOUR_SUBDOMAIN.parseapp.com/login.

Installation

Move main.js and app.js into your cloud/ folder in Cloud Code if it's a new project. If you're already using Express, update your app.js accordingly.

If you already have a Parse Hosting app set up, but you're not using Express yet, add the following to your `main.js:

@hramos
hramos / parse
Created Jan 8, 2013
Run the Parse Cloud Code CLI from a root folder with this script. Edit `cloud_code/` to point to your actual Cloud Code subdirectory.
View parse
#!/bin/bash
cd cloud_code/ && parse $*
@hramos
hramos / parse_resource_test_fail
Created Jan 22, 2012
Failing tests on ParseResource
View parse_resource_test_fail
$ rake test
WARNING: 'require 'rake/rdoctask'' is deprecated. Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead.
at /Users/hramos/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
/Users/hramos/.rvm/rubies/ruby-1.9.2-p290/bin/ruby -I"lib:lib:test" -I"/Users/hramos/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib" "/Users/hramos/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb" "test/**/test_*.rb"
Loaded suite /Users/hramos/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/rake_test_loader
Started
..F.FE.F..........................1st
2nd
.
Finished in 145.559260 seconds.
View special_hell
#import <Foundation/Foundation.h>
#define dispatch_if_available(queue, code) do{ \
if(dispatch_async != NULL) { \
dispatch_async(queue, ^(void) {\
code\
});\
} else {\
code\
}\
} while(0)
View blocks_irl.m
if (dispatch_async != NULL) {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
// background stuff
dispatch_sync(dispatch_get_main_queue(), ^(void) {
// main thread stuff
});
});
} else {
// use your favorite pre-iOS 4 threading code