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
    
  
  
    
  | #!/bin/bash | |
| if [ -z "$1" ] || [ -z "$2" ]; then | |
| echo "Usage: extractheaders src dest" | |
| exit | 
  
    
      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
    
  
  
    
  | #!/bin/bash | |
| if [[ `uname` =~ MINGW.* ]]; then | |
| GS=gswin64c | |
| else | |
| GS=gs | |
| fi | |
| output=$1 | |
| shift | 
  
    
      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
    
  
  
    
  | void EncodeJPEG(boost::uint8_t *rgb, const int &width, const int &height, | |
| boost::shared_array<boost::uint8_t> &outbuffer, int *size) { | |
| jpeg_compress_struct cinfo = {0}; | |
| jpeg_error_mgr jerror = {0}; | |
| jerror.trace_level = 10; | |
| cinfo.err = jpeg_std_error(&jerror); | |
| jerror.trace_level = 10; | |
| cinfo.err->trace_level = 10; | |
| jpeg_create_compress(&cinfo); | 
  
    
      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
    
  
  
    
  | ;;; package -- Sumary | |
| ;;; Commentary: | |
| ;;; Code: | |
| ;;; Set load path | |
| (add-to-list 'load-path "~/.emacs.d/custom/") | |
| ;;;; PACKAGE SYSTEM | |
| ;; For some reason, this must be one of the first things to be loaded. | |
| (require 'package) | 
  
    
      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 <boost/uuid/sha1.hpp> | |
| #include <sstream> | |
| #include <cstddef> | |
| #include <string> | |
| std::string Sha1sum(void *data, std::size_t count) { | |
| boost::uuids::detail::sha1 hasher; | |
| char hash[20]; | |
| hasher.process_bytes(data, count); | |
| unsigned int digest[5]; | 
  
    
      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
    
  
  
    
  | if [ -n "$PS1" ]; then | |
| alias ls='ls -h --color' | |
| alias grep='grep --color' | |
| alias egrep='egrep --color' | |
| alias fgrep='fgrep --color' | |
| else | |
| alias ls='ls -h' | |
| fi | |
| alias ll='ls -l --group-directories-first' | 
  
    
      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
    
  
  
    
  | void Bitmap2Yuv420p(boost::uint8_t *destination, boost::uint8_t *rgb, | |
| const int &width, const int &height) { | |
| const std::size_t image_size = width * height; | |
| boost::uint8_t *y = destination; | |
| boost::uint8_t *u = destination + image_size; | |
| boost::uint8_t *v = destination + image_size + image_size / 4; | |
| boost::uint8_t *r = rgb; | |
| boost::uint8_t *g = rgb + 1; | |
| boost::uint8_t *b = rgb + 2; | 
NewerOlder