Skip to content

Instantly share code, notes, and snippets.

View bkamber's full-sized avatar
🇹🇷
Focusing

Bilgehan KAMBER bkamber

🇹🇷
Focusing
View GitHub Profile
### Keybase proof
I hereby claim:
* I am bkamber on github.
* I am bkamber (https://keybase.io/bkamber) on keybase.
* I have a public key ASDQwLiExeT2nOXT2-zV_JNq-MhuP8ivrHDW2QQxRyXo9wo
To claim this, I am signing this object:
@songritk
songritk / install-soapysdr.sh
Last active June 27, 2023 07:12
SoapySDR install script for raspberry PI
# Building CubicSDR for Linux
# This script will successfully build CubicSDR under Debian Jessie on the Raspberry Pi3.
# Adapted from https://github.com/cjcliffe/CubicSDR/wiki/Build-Linux
# Larry Dighera June 7, 2016
# LDighera@att.net
# songritk Mar 24,2018
sudo apt-get install -y git build-essential automake cmake
sudo apt-get install -y libpulse-dev libgtk-3-dev
@Everlanders
Everlanders / LightMonitor.py
Created March 13, 2018 14:47
Headlight and Reverse Lights monitor for YouTube Commenters - UNTESTED but should work fine.
#!/usr/bin/python
# A quick hack of my button monitor script to monitor headlights and reverse lights to
# Dim the screen and switch to the reverse camera.
# I have not tested this...
# Remember, the switch or opto is switching to ground, so the logic is inverted... 0 = on 1 = off
# Also, you would run only one of these "Monitor" scripts. you can't be running RearviewMonitor.py AND LightMonitor.py
import RPi.GPIO as GPIO
import time
import subprocess, os
@wojteklu
wojteklu / clean_code.md
Last active May 3, 2024 08:55
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@gbaman
gbaman / HowToOTGFast.md
Last active May 1, 2024 08:26
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i

@gbaman
gbaman / HowToOTG.md
Last active May 2, 2024 01:27
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int

@pblca
pblca / instantiate.html
Last active June 18, 2017 05:36
Getting Started Tutorial for Using PubNub with JavaScript
<!-- Include the PubNub Library -->
<script src="https://cdn.pubnub.com/pubnub.min.js"></script>
<!-- Instantiate PubNub -->
<script type="text/javascript">
var PUBNUB_demo = PUBNUB.init({
publish_key: 'Your Publish Key Here',
subscribe_key: 'Your Subscribe Key Here'
});
@aksakalli
aksakalli / SimpleHTTPServer.cs
Last active April 22, 2024 13:20
SimpleHTTPServer in C#
// MIT License - Copyright (c) 2016 Can Güney Aksakalli
// https://aksakalli.github.io/2014/02/24/simple-http-server-with-csparp.html
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;
using System.IO;