Skip to content

Instantly share code, notes, and snippets.

View hramos's full-sized avatar

Héctor Ramos hramos

View GitHub Profile
@hramos
hramos / ffmpeg.md
Created August 14, 2019 17:22 — 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:

@hramos
hramos / Armor.h
Created July 26, 2016 19:11
PFSubclassing Properties & Methods
@interface Armor : PFObject<PFSubclassing>
@property (nonatomic, strong) NSString *displayName;
@end
@hramos
hramos / Armor.h
Created July 26, 2016 19:09
Subclassing PFObject
@interface Armor : PFObject<PFSubclassing>
+ (NSString *)parseClassName;
@end
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 November 14, 2015 15:07
node-sonos-http-api client for Parse Cloud Code
'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 June 16, 2021 09:34
A middleware module for logging in a Parse.User using Facebook in express.

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 January 8, 2013 01:02
Run the Parse Cloud Code CLI from a root folder with this script. Edit `cloud_code/` to point to your actual Cloud Code subdirectory.
#!/bin/bash
cd cloud_code/ && parse $*
@hramos
hramos / parse_resource_test_fail
Created January 22, 2012 18:45
Failing tests on ParseResource
$ 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.
#import <Foundation/Foundation.h>
#define dispatch_if_available(queue, code) do{ \
if(dispatch_async != NULL) { \
dispatch_async(queue, ^(void) {\
code\
});\
} else {\
code\
}\
} while(0)
@hramos
hramos / blocks_irl.m
Created December 14, 2011 21:57
reality
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