This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <dirent.h> | |
| #include <iterator> | |
| #include <cstdlib> | |
| #include <cstring> | |
| #include <sstream> | |
| #include <iostream> | |
| #include <stdlib.h> | |
| #include <string> | |
| #include <sys/stat.h> | |
| #include <syslog.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| from PySide.QtCore import * | |
| from PySide.QtGui import * | |
| import cv2 | |
| import sys | |
| class MainApp(QWidget): | |
| def __init__(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CC=g++ | |
| MOC=moc-qt4 | |
| CFLAGS=-Wall | |
| SOURCES=hello.cc hello_cls.cc | |
| MOC_HEADERS=hello_cls.h | |
| EXECUTABLE=hello | |
| INCDIRS=-I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore | |
| LIBS=-lQtCore -lQtGui | |
| # Change postfixes | |
| MOC_SOURCES=$(MOC_HEADERS:.h=.moc.cc) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| # Create display override file to force Mac OS X to use RGB mode for Display | |
| # see http://embdev.net/topic/284710 | |
| require 'base64' | |
| data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
| edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
| vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Use folowing steps to repackage dep package: | |
| 1: Extract deb package | |
| # dpkg-deb -x <package.deb> <dir> | |
| 2: Extract control-information from a package | |
| # dpkg-deb -e <package.deb> <dir/DEBIAN> | |
| 3. After completed to make changes to the package, repack the deb | |
| # dpkg-deb -b <dir> <new-package.deb> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <pthread.h> | |
| using namespace std; | |
| class ScopedLock { | |
| public: | |
| ScopedLock(pthread_mutex_t & m): mp(&m){ | |
| pthread_mutex_lock(mp); | |
| }; | |
| ~ScopedLock(){ |
NewerOlder