Skip to content

Instantly share code, notes, and snippets.

View sailfish009's full-sized avatar

sailfish009

  • freelancer
  • South Korea
View GitHub Profile
@sailfish009
sailfish009 / ffmpeg_msvc.txt
Last active June 22, 2018 01:44
build ffmpeg static with visual studio 2015
0.visual studio 2015 update 2 ( 7 GB)
http://download.microsoft.com/download/1/2/1/1211d9dd-b504-47f2-90f2-20cb8b44e096/vs2015.2.ent_enu.iso
1. download ffmpeg source file
http://ffmpeg.org/releases/ffmpeg-3.0.2.tar.bz2
2. download msys2
http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20160205.exe
3. download yasm 64bit and copy it to /usr/bin/yasm.exe
@sailfish009
sailfish009 / openh264_msvc.txt
Last active June 15, 2016 02:29
Build openh264 with MSVC
0. git clone openh264 source
git clone https://github.com/cisco/openh264
1. download msys2
http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20160205.exe
3. download nasm 64bit, extract it to /usr/bin
http://www.nasm.us/pub/nasm/releasebuilds/2.12.01/win64/nasm-2.12.01-win64.zip
4. pacman -S pkg-config diffutils make
@sailfish009
sailfish009 / Makefile
Created July 21, 2016 02:03 — forked from sehe/Makefile
Boost shared memory lockfree circular buffer queue
all:consumer producer
CPPFLAGS+=-std=c++03 -Wall -pedantic
CPPFLAGS+=-g -O0
CPPFLAGS+=-isystem ~/custom/boost/
LDFLAGS+=-L ~/custom/boost/stage/lib/ -Wl,-rpath,/home/sehe/custom/boost/stage/lib
LDFLAGS+=-lboost_system -lrt -lpthread
%:%.cpp
@sailfish009
sailfish009 / sdl2_opengl.cpp
Created September 20, 2016 06:38 — forked from sergnechaev/sdl2_opengl.cpp
Very basic SDL2 OpenGL application (C++1y)
#include <iostream>
#define _USE_MATH_DEFINES
#include <cmath>
#include <SDL2/SDL.h>
#include <SDL2/SDL_opengl.h>
constexpr int SCREEN_WIDTH = 800;
constexpr int SCREEN_HEIGHT = 600;
#define GLEW_STATIC 1
#define FREEGLUT_STATIC 1
#include <glew.h>
#include <glut.h>
#pragma comment(lib, "../lib/glew32.lib")
#pragma comment(lib, "opengl32.lib")
int main()
cmake_minimum_required(VERSION 3.6)
add_subdirectory(a)
add_subdirectory(b)
SET(CMAKE_DEFAULT_STARTUP_PROJECT b)
add_dependencies(b a)
--------------------------------------------------
cmake_minimum_required(VERSION 3.6)
diff --git a/src/unix/internal.h b/src/unix/internal.h
index 03a9226..b2f1a41 100644
--- a/src/unix/internal.h
+++ b/src/unix/internal.h
@@ -86,7 +86,7 @@
#endif
#if defined(__linux__)
-# define UV__POLLIN UV__EPOLLIN
+# define UV__POLLIN (UV__EPOLLIN | UV__EPOLLPRI)
@sailfish009
sailfish009 / FreeType2_Mono.c
Created February 20, 2017 04:31 — forked from ironpinguin/FreeType2_Mono.c
Simple example to use FreeType for get a monochrome text output rendering. build linux: gcc -g -o freeTypeDemo FreeType2_Mono.c -I/usr/include/freetype2 -L/usr/lib/x86_64-linux-gnu -lz -lfreetype -lm
/* First test with FreeType2 library */
/* Output to console of mono rendered font */
/*
* FreeType2_Mono.c
*
* Created by Michele Catalano <michele@catalano.de>.
*
* Copyright (c) 2013 Michele Catalano
* All rights reserved.
*
@sailfish009
sailfish009 / fput
Last active March 21, 2020 00:18
ftp put bash shell
ftp -pn <<EOF
open 192.168.0.10
quote USER anonymous
quote PASS aaa
binary
put $1
EOF
@sailfish009
sailfish009 / fget
Last active March 21, 2020 00:19
ftp get bash shell
ftp -pn <<EOF
open 192.168.0.10
quote USER anonymous
quote PASS aaa
binary
get $1
EOF