Skip to content

Instantly share code, notes, and snippets.

View patrickelectric's full-sized avatar
🏡
Working from home

Patrick José Pereira patrickelectric

🏡
Working from home
View GitHub Profile
@patrickelectric
patrickelectric / provant-ascii
Created August 27, 2014 17:00
provant-ascii
_____________ /\ ____________
/\_ _ __ ___ \ \/ / __ _ _ __ / |_
/ /_)/ '__/ _ \ \ / / _` | '_ \| __|
/ ___/| | | (_) \ \/ / (_| | | | | |_
\/ |_| \___/ \__/ \__,_|_| |_|\__|
@vr2262
vr2262 / testing-travis.md
Created December 7, 2015 15:38
Testing the Travis environment locally
@rroohhh
rroohhh / client.sh
Created February 4, 2017 16:51
gstreamer video udp
gst-launch-1.0 -v udpsrc uri=udp://239.1.1.1:5000 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000,encoding-name=(string)H264,packetization-mode=(string)1,profile-level-id=(string)640028,payload=(int)96, a-framerate=(string)25" ! rtph264depay ! h264parse ! vaapidecode ! fpsdisplaysink video-sink=xvimagesink
@piedar
piedar / keypoints.cpp
Last active December 9, 2018 06:08
Keypoint Object Matching with SURF/BRISK - https://www.youtube.com/watch?v=-r9J1eO4qg4
// This file is hereby released into the public domain.
// This code contains a skeleton for Keypoint Object Matching with SURF/BRISK
// It was extracted from the code of an unreleased demo - https://www.youtube.com/watch?v=-r9J1eO4qg4
// It will not compile as-is, but may function as a starting point.
#include <set>
#include <string>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include "Freenect.hpp"
@rjehangir
rjehangir / iperf3-usage.md
Last active March 7, 2019 16:09
Commands for Bandwidth Testing Using iperf3

iperf3 Usage for Bandwidth Testing

We use this command to test bandwidth and packet loss versus tether length with the Fathom-X tether interface boards.

Server (i.e. Raspberry Pi)

The IP address in this command should be the IP address of the server.

@petetnt
petetnt / stale.md
Last active April 23, 2019 15:21
On the issue of staleness

On the issue of staleness

@sindresorhus posted this tweet today about a thing I remember writing about beforehand too (or at least have thought about it a lot): staleness

Controversial opinion: Stale issues in open source projects are fine. Auto-closing issues based on staleness is an annoyance to users and can drive potential contributors away. There must be a better way of handling issue overload.

@sindresorhus (https://twitter.com/sindresorhus/status/1082145283285250048)

Here's a couple of short thoughts I have on the issue of staleness after maintaining things like brackets and our own projects for years.

#!/bin/sh -exu
dev=$1
cd $(mktemp -d)
function umountboot {
umount boot || true
umount root || true
}
# RPi1/Zero (armv6h):
@Williangalvani
Williangalvani / findPing360.py
Last active October 2, 2019 23:11
script to find
#!/usr/bin/env python3
"""
Scan with ./findPing360.py [current IP of the interface to scan]
"""
import socket
import time
import argparse
parser = argparse.ArgumentParser(description='Process some integers.')
@zbyhoo
zbyhoo / count_gcc_warnings.sh
Created April 27, 2011 12:09
Sorts and counts all warnings from gcc compilation output
#!/bin/bash
if [ "$#" != "1" ]
then
echo wrong number of arguments
echo Usage: $0 \<filename\>
echo filename - file with build output
exit 1
else
cat $1 | grep "warning:" | sort | uniq -c | sort -nr | awk '{print $0}{total+=1}END{print "Total number of warnings:\n"total}'
@KeyMaster-
KeyMaster- / polarWarp.glsl
Last active November 20, 2019 15:00
Luxe polar warp shader
//The source texture that will be transformed
uniform sampler2D tex0;
//The texture coordinate passed in from the vertex shader (the default luxe vertex shader is suffice)
varying vec2 tcoord;
//x: width of the texture divided by the radius that represents the top of the image (normally screen width / radius)
//y: height of the texture divided by the radius representing the top of the image (normally screen height / radius)
uniform vec2 sizeOverRadius;