Skip to content

Instantly share code, notes, and snippets.

View saoron's full-sized avatar

Yossi Neiman saoron

View GitHub Profile
@evanj
evanj / crc32c.go
Created August 6, 2018 15:43
Prints crc32c hashes in the same format as Google Cloud storage
// Prints CRC32C hashes in the same format as Google Cloud Storage
//
// Usage: crc32c (paths to hash)
// See also: gsutil hash
package main
import (
"encoding/base64"
"encoding/hex"
"fmt"
@ahmeti
ahmeti / only-number.directive.md
Last active April 23, 2024 17:47
Angular 5 - Only Number Input, Only Number Decimal
@umardx
umardx / Pi3_as_WiFi_AP_Bridge.md
Last active April 30, 2024 14:08
Using a Raspberry Pi 3 as a Wifi access point and bridge

The specificity of my setup, is that the Raspberry won’t be a router but a bridge. DHCP is thus delegated to the main ADSL router and all devices connected to the AP will appear on the same network than other devices. The instructions below are based on a fresh Raspbian lite install so that it can be reproduced easily.

Install the required packages :

$ sudo apt-get install -y bridge-utils hostapd

To create a bridge, we need to enable ip_forward in the kernel, for that, edit /etc/sysctl.conf and remove comment (#) from the following line :

@codebrainz
codebrainz / license.txt
Last active March 6, 2024 00:14
MJPEG Player in JavaScript
Copyright 2015 Matthew Brush
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@ik5
ik5 / colors.go
Last active April 8, 2024 14:25
Simple golang expirement with ANSI colors
package main
// http://play.golang.org/p/jZ5pa944O1 <- will not display the colors
import "fmt"
const (
InfoColor = "\033[1;34m%s\033[0m"
NoticeColor = "\033[1;36m%s\033[0m"
WarningColor = "\033[1;33m%s\033[0m"
ErrorColor = "\033[1;31m%s\033[0m"
DebugColor = "\033[0;36m%s\033[0m"
/*
Basic MQTT example with Authentication
How to send MQTT data to IBM Bluemix from Intel Edison via Arduino.
by Rex St. John
*/
#include <SPI.h>
#include <WiFi.h>
@xeoncross
xeoncross / Webserver.c
Created November 19, 2012 21:05
A web server in C language using only the standard libraries and thought it would be useful for you guys if I share the code. The server runs on Linux and includes features like handling HTTP GET request, handling content types(txt, html, jpg, zip. rar,
/*
* WebServer.c
*
* Created on: Nov 3, 2012
* Author: pavithra
*
* A web server in C language using only the standard libraries.
* The port number is passed as an argument.
*
* http://css.dzone.com/articles/web-server-c