Use GNU netcat 0.7.1 from Homebrew.
# listener
netcat -l -p 4444
# sender
netcat localhost 4444
[1/3524, ??:??/??:??] install: 12many [3k] | |
[2/3524, 00:00/00:00] install: 2up [5k] | |
[3/3524, 00:00/00:00] install: Asana-Math [481k] | |
[4/3524, 00:01/31:34] install: ESIEEcv [2k] | |
[5/3524, 00:01/31:28] install: FAQ-en [1k] | |
[6/3524, 00:02/01:02:52] install: GS1 [4k] | |
[7/3524, 00:02/01:02:27] install: HA-prosper [28k] | |
[8/3524, 00:02/59:06] install: IEEEconf [3k] | |
[9/3524, 00:02/58:50] install: IEEEtran [88k] | |
[10/3524, 00:03/01:15:36] install: MemoirChapStyles [1k] |
#!/bin/bash | |
set -e | |
function usage() { | |
cat << EOF | |
USAGE: | |
./shaper start <interface> <bw as XXX kbit> | |
./shaper clear <interface> | |
./shaper show <interface> | |
EOF |
extern crate iron; | |
use std::collections::HashMap; | |
use std::str::FromStr; | |
use std::io::Read; | |
use std::sync::RwLock; | |
use iron::prelude::*; | |
use iron::{status, Handler}; |
dyld: Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /usr/local/lib/libJPEG.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
error: Process didn't exit successfully: `target/debug/main` (signal: 5, SIGTRAP: trace/breakpoint trap)
Similarly for libTIFF.dylib, etc.
#!/bin/sh | |
set -e | |
cd /Volumes/CANON/DCIM/100CANON; | |
for f in *.CR2 | |
do | |
b=$(basename $f .CR2) | |
if [ ! -f "/Volumes/CANON/DCIM/100CANON/$b.JPG" ]; then | |
rm $b.CR2 | |
fi |
#include <stdio.h> | |
#if __APPLE__ | |
#include <Accelerate/Accelerate.h> | |
#elif __linux__ | |
#include <cblas.h> | |
#endif | |
// Calculate a * b | |
float a[4][4] = { |
Use sips
to convert images from types to types and to the same resolution:
for i in *.tiff; do sips -z 600 600 -s format png $i --out converted/$i.png; done
cmake_minimum_required(VERSION 3.0.0) | |
set(PROJECT project-name) | |
project(${PROJECT}) | |
set(SOURCES | |
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp | |
${CMAKE_CURRENT_SOURCE_DIR}/imgui.cpp | |
${CMAKE_CURRENT_SOURCE_DIR}/imgui_demo.cpp | |
${CMAKE_CURRENT_SOURCE_DIR}/imgui_draw.cpp | |
${CMAKE_CURRENT_SOURCE_DIR}/imgui_impl_glfw.cpp |