Skip to content

Instantly share code, notes, and snippets.

Avatar

yboujraf yboujraf

View GitHub Profile
@yboujraf
yboujraf / README.md
Created Oct 27, 2019 — forked from hwdsl2/README.md
My IPTables rules for securing the Asterisk VoIP server
View README.md
@yboujraf
yboujraf / net.js
Created Dec 20, 2019 — forked from sid24rane/net.js
Simple TCP Client and Server in Node.js (Covering all useful Properties & Methods)
View net.js
var net = require('net');
// creates the server
var server = net.createServer();
//emitted when server closes ...not emitted until all connections closes.
server.on('close',function(){
console.log('Server closed !');
});
@yboujraf
yboujraf / udp.js
Created Dec 20, 2019 — forked from sid24rane/udp.js
Simple UDP Client and Server in Node.js ==> ( Echo Server )
View udp.js
var udp = require('dgram');
// --------------------creating a udp server --------------------
// creating a udp server
var server = udp.createSocket('udp4');
// emits when any error occurs
server.on('error',function(error){
console.log('Error: ' + error);
View capture_raw_frames.c
/*
* V4L2 video capture example
*
* This program can be used and distributed without restrictions.
*
* This program is provided with the V4L2 API
* see http://linuxtv.org/docs.php for more information
*/
#include <stdio.h>
View capture_raw_frames.c
/*
* V4L2 video capture example
*
* This program can be used and distributed without restrictions.
*
* This program is provided with the V4L2 API
* see http://linuxtv.org/docs.php for more information
*/
#include <stdio.h>
@yboujraf
yboujraf / rpi-cpuinfo-dt.md
Created Jan 14, 2020 — forked from jperkin/rpi-cpuinfo-dt.md
raspberry pi cpuinfo vs device-tree
View rpi-cpuinfo-dt.md

Raspberry Pi cpuinfo vs device-tree

My attempt at gathering information on how to detect exactly which Raspberry Pi model we are running on for https://github.com/jperkin/node-rpio. The goal is to come up with an optimal way of detecting the host across a wide range of hardware and OS.

Data

Name (Rev) cpuinfo /proc/device-tree/model device-tree/soc/ranges OS
B (1.0) 0002 Raspberry Pi Model B 7e000000 20000000 01000000 7
B (1.0) 0002 Raspberry Pi Model B Rev 1 7e000000 20000000 02000000 10
@yboujraf
yboujraf / rpi-cpuinfo-dt.md
Created Jan 14, 2020 — forked from jperkin/rpi-cpuinfo-dt.md
raspberry pi cpuinfo vs device-tree
View rpi-cpuinfo-dt.md

Raspberry Pi cpuinfo vs device-tree

My attempt at gathering information on how to detect exactly which Raspberry Pi model we are running on for https://github.com/jperkin/node-rpio. The goal is to come up with an optimal way of detecting the host across a wide range of hardware and OS.

Data

Name (Rev) cpuinfo /proc/device-tree/model device-tree/soc/ranges OS
B (1.0) 0002 Raspberry Pi Model B 7e000000 20000000 01000000 7
B (1.0) 0002 Raspberry Pi Model B Rev 1 7e000000 20000000 02000000 10
@yboujraf
yboujraf / baseConverter.js
Created Mar 29, 2020 — forked from faisalman/baseConverter.js
Convert From/To Binary/Decimal/Hexadecimal in JavaScript
View baseConverter.js
/**
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript
* https://gist.github.com/faisalman
*
* Copyright 2012-2015, Faisalman <fyzlman@gmail.com>
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
*/
(function(){
You can’t perform that action at this time.