Skip to content

Instantly share code, notes, and snippets.

OSX gstreamer개발자를 위한 homebrew 활용 팁

이 페이지를 읽는 개발자는 homebrew를 알고 있다고 가정한다. 최신 gstreamer git master를 homebrew로 빌드하는 방법과 로컬 git을 사용하여 빌드하는 방법을 공유하고자 한다.

git master 빌드하기

$ brew install --HEAD gstreamer

homebrew에서 --HEAD 옵션으로 git master로 패키지를 설치할 수 있는 기능을 제공한다. 물론 해당 패키지의 recipe가 git으로 빌드할 수 있도록 head 항목이 recipe에 기술되어 있는 경우에 가능하다. (gstreamer 관련 패키지는 모두 등록되어 있다)

@luckypapa
luckypapa / int_identical_index.c
Last active August 29, 2015 14:20
codercareer : No. 57 - Integer Identical to Index
// http://codercareer.blogspot.kr/2014/10/no-57-integer-identical-to-index.html
#include <stdio.h>
#include <stdbool.h>
// array has been already sorted.
// So we can use binary search to reduece timecost
int getValueSameWithIndex(int * array, int length) {
if (array == NULL || length == 0)
return -1;
//http://codercareer.blogspot.kr/2013/02/no-44-maximal-stolen-values.html
#include <stdio.h>
#define ARRAY_MAX 10
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
int findMaxStolenValue(int *array, int size) {
if (size == 0)
return 0;
@luckypapa
luckypapa / getTransCount.cpp
Created May 23, 2015 02:51
No. 55 - Translating Numbers to Strings : solution
//http://codercareer.blogspot.kr/2014/09/no-55-translating-numbers-to-string.html
#include <iostream>
#include <string>
#include <assert.h>
using namespace std;
int getTransCount(string number) {
if (atoi(number.c_str()) <= 0)
return 0;
@luckypapa
luckypapa / findMaximumSumOfSubArray.cpp
Created May 29, 2015 07:19
No. 03 - Maximum Sum of All Sub-arrays - solution
//http://codercareer.blogspot.kr/2011/09/no-03-maximum-sum-of-all-sub-arrays.html
#include <stdio.h>
#include <algorithm>
#include <assert.h>
using namespace std;
int findMaximumSumOfSubArray(int *array, int length) {
if (array == NULL || length <= 0) {
printf("wrong input \n");
@luckypapa
luckypapa / find_turning_number.cpp
Last active August 29, 2015 14:22
No. 22 - Turning Number in an Array - solution
//http://codercareer.blogspot.kr/2011/11/no-22-turning-number-in-array.html
//timecost : O(logN)
#include <assert.h>
#include <stdio.h>
int findTurningNumber(int * array, int length) {
if (array == NULL || length <= 2)
return -1;
@luckypapa
luckypapa / leftRotationOfString.c
Last active August 29, 2015 14:23
No. 19 - Left Rotation of String
//http://codercareer.blogspot.kr/2011/11/no-19-left-rotation-of-string.html
// time complexity : O(n)
// space complexity : O(n)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void Reverse(char *pBegin, char *pEnd) {
if(pBegin == NULL || pEnd == NULL)
// https://algospot.com/judge/problem/read/JOSEPHUS
// time complexity O(kN)
// space complexity O(N)
#include <stdio.h>
#include <list>
using namespace std;
void findAlivePerson(int n, int k) {
@luckypapa
luckypapa / findMissingNumberInArray.cpp
Created June 28, 2015 23:29
No. 37 - Missing Number in an Array - solution
// http://codercareer.blogspot.kr/2013/02/no-37-missing-number-in-array.html
// problem1 => time complexity : O(N), space complexity : O(2)
// problem2 => time complexity : O(logN), space complexity : O(3)
#include <iostream>
#include <assert.h>
using namespace std;
@luckypapa
luckypapa / lectureNote.cpp
Created July 5, 2015 02:16
Lecture Note solution
// https://algospot.com/judge/problem/read/LECTURE
// Time Complexity : O(nlogn)
// Space Complexity : O(n)
#include <string>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;