Skip to content

Instantly share code, notes, and snippets.

@roxlu
roxlu / uyvy422.c
Created June 17, 2013 08:43
GL 3.0, UYVY422 shader using GL_RGB_422_APPLE as internalFormat, GL_UNSIGNED_SHORT_8_8_APPLE as format
static const char* YUYV_VS = ""
"#version 150\n"
"uniform mat4 u_pm;"
"uniform mat4 u_mm;"
"in vec4 a_pos;"
"in vec2 a_tex;"
"out vec2 v_tex;"
"void main() {"
" gl_Position = u_pm * u_mm * a_pos; "
@roxlu
roxlu / CMakeLists.txt
Created May 30, 2013 14:32
CMake: how to copy a Framework on Mac to the install directory (${roxlu_app_install_dir}) and change the @executable_path so that your application can link with it
# EXPERIMENTAL: Copy frameworks from extern/lib/mac/frameworks, to the install dir and set the @executable paths
# frameworks from the extern/lib/mac/frameworks dir
# ----------------------------------------------------------------------------
foreach(framework_name in ${roxlu_frameworks})
set(framework_dir ${roxlu_base_dir}/extern/lib/mac/frameworks/${framework_name}.framework)
if(IS_DIRECTORY ${framework_dir})
set(framework_dest_dir ${roxlu_app_install_dir}/lib/)
set(framework_file ${framework_dest_dir}${framework_name}.framework/${framework_name})
get_filename_component(framework_file ${framework_file} ABSOLUTE)
@roxlu
roxlu / install_arch_linux.org
Created March 5, 2013 22:42
Install arch-linux - work in progress gui

Installing ARCH linux

Preparation:

  • Get an empty USB disk
  • Create 2 partitions:
    • ARCH - filesystem FAT
    • FAT - filesystem FAT
  • Downlaod Arch linux from: www.archlinux.org/download and put on your USB ARCH partition
  • Make sure you have an Ubuntu install somewhere (VMware would work)

Fix the iso to be usable for UEFI:

@roxlu
roxlu / Oil.cpp
Created March 2, 2013 17:23
Oil Painting a la Petros Vrellis Starry Night
#include "Oil.h"
Oil::Oil()
:gray_pixels(0)
,color_pixels(0)
{
}
Oil::~Oil() {
}
@roxlu
roxlu / APP_CMakeLists.txt
Created February 27, 2013 00:33
openframeworks CMakeLists.txt files for VS2010 and Mac/XCode
cmake_minimum_required(VERSION 2.8)
include(${CMAKE_CURRENT_LIST_DIR}/../../../../../scripts/cmake/CMakeLists.txt)
of_app_initialize("test")
of_app_add_source_file(main.cpp)
of_app_add_source_file(testApp.cpp)
of_install_app()
@roxlu
roxlu / install_cygwin_sshd.txt
Last active November 27, 2023 22:20
Installing CYGWIN + SSHD for remote access through SSH on windows
Installing CYGWIN with SSH
1) Download cygwin setup.exe from http://www.cygwin.com
- Execute setup.exe
- Install from internet
- Root directory: `c:\cygwin` + all users
- Local package directory: use default value
- Select a mirror to download files from
- Select these packages:
- editors > xemacs 21.4.22-1
- net > openssh 6.1-p
@roxlu
roxlu / APPLICATION_CMakeLists.txt
Last active December 14, 2015 05:19
WIP CMakeLists files for OF (tested on OSX 10.8), soon for Win/Linux too
cmake_minimum_required(VERSION 2.8)
include(${CMAKE_CURRENT_LIST_DIR}/../../../../../scripts/cmake/CMakeLists.txt)
of_app_initialize("test")
of_app_add_source_file(main.cpp)
of_app_add_source_file(testApp.cpp)
of_install_app()
@roxlu
roxlu / Uploader.php
Last active December 12, 2015 08:19
Highly configurable (auto) file uploader. A util/application which makes HTTP POSTS based on entries of a table from a database and upload specified fields as file-posts. Contact me on twitter (twitter.com/roxlu or by mail info[.......]roxlu[....]com for more info and/or binaries for windows, mac and linux)
<?php
/**
* Version 0.0.1
* -------------
*
* Uploader handler for uploader util.
* ----------------------------------
* Example class which handles a file upload from the
* uploader utility. This class doesn't do a lot, except
@roxlu
roxlu / VideoSurface.cpp
Created January 29, 2013 11:25
Fast texture uploads using pixel buffer objects. Improved upload of a 768x1366 texture from 16-20ms to 1-3ms (we can improve the performance a bit more by using GPU default pixel formats)
#include <shared/VideoSurface.h>
GLuint VideoSurface::prog = 0;
GLint VideoSurface::u_pm = 0;
GLint VideoSurface::u_mm = 0;
GLint VideoSurface::u_tex = 0;
GLfloat VideoSurface::pm[16] = {0};
VideoSurface::VideoSurface()
:width(0)
@roxlu
roxlu / list.txt
Created January 25, 2013 19:22
List of compiler targets. Use for example: ./configure --target=x86-darwin11-gcc
armv5te-android-gcc armv5te-linux-rvct armv5te-linux-gcc
armv5te-none-rvct
armv6-darwin-gcc armv6-linux-rvct armv6-linux-gcc
armv6-none-rvct
armv7-android-gcc armv7-darwin-gcc armv7-linux-rvct
armv7-linux-gcc armv7-none-rvct
mips32-linux-gcc
ppc32-darwin8-gcc ppc32-darwin9-gcc ppc32-linux-gcc
ppc64-darwin8-gcc ppc64-darwin9-gcc ppc64-linux-gcc
sparc-solaris-gcc