Skip to content

Instantly share code, notes, and snippets.

View godspeed1989's full-sized avatar
🎯
Focusing

godspeed1989 godspeed1989

🎯
Focusing
View GitHub Profile
@godspeed1989
godspeed1989 / FPS.cpp
Last active December 15, 2015 11:39
printf FPS in opencv
cv::VideoCapture cap(0); // open the default camera
if(!cap.isOpened()) // check if we succeeded
{
printf("Camera open error.\n");
return -1;
}
char strfps[64] = "0 fps";
clock_t start = clock();
unsigned int fps = 0;
for(;;)
@godspeed1989
godspeed1989 / xilinx.rules
Created May 2, 2013 10:38
xilinx zynq udev rules file
SUBSYSTEM=="usb", ACTION=="add", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014", GROUP="user", MODE="0777"
SUBSYSTEM=="usb", ACTION=="add", ATTRS{idVendor}=="04b4", ATTRS{idProduct}=="0008", GROUP="user", MODE="0777"
@godspeed1989
godspeed1989 / digilent-zed.dts
Created May 6, 2013 06:49
zedboard linux dts
/dts-v1/;
/ {
model = "Xilinx Zynq ZED";
compatible = "xlnx,zynq-zed";
#address-cells = <0x1>;
#size-cells = <0x1>;
interrupt-parent = <&gic>;
ps7_ddr_0: memory@0 {
@godspeed1989
godspeed1989 / colours.txt
Created May 8, 2013 09:52
favourite colours
BEIGE 米黄色
Red 248
Green 243
Blue 209
#F8F3D1
Green bean
Red 199
Green 237
Blue 204
@godspeed1989
godspeed1989 / gist:5590281
Last active November 30, 2020 15:02
/etc/init.d/rcS
#!/bin/sh
echo "Starting rcS..."
echo "++ Mounting filesystem"
mount tmpfs /dev -t tmpfs
mount proc /proc -t proc
mount sysfs /sys -t sysfs
mkdir -p /dev/pts
mkdir -p /dev/i2c
@godspeed1989
godspeed1989 / fstab
Created May 16, 2013 08:37
/etc/fstab example
#<file system> <mount-point> <type> <options> <dump> <pass>
/dev/root / auto defaults,errors=remount-ro 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /tmp tmpfs defaults 0 0
sysfs /sys sysfs auto 0 0
@godspeed1989
godspeed1989 / pi_streaming_video.md
Last active September 13, 2020 16:38
raspberry pi ffmepg streaming video
/opt/vc/bin/raspivid -o - -t 0 -n -w 600 -h 400 -fps 12 | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264 -no-audio --clock-jitter=0 --sout-transcode-hurry-up --drop-late-frames --avcodec-hw=any
rtsp://###.###.###.###:8554/

/etc/ffserver.conf

Port 80
BindAddress 0.0.0.0