Skip to content

Instantly share code, notes, and snippets.

View bkamber's full-sized avatar
🇹🇷
Focusing

Bilgehan KAMBER bkamber

🇹🇷
Focusing
View GitHub Profile
@bkamber
bkamber / clean_code.md
Created April 21, 2021 19:11 — forked from wojteklu/clean_code.md
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

@bkamber
bkamber / HowToOTG.md
Created July 9, 2020 17:18 — forked from gbaman/HowToOTG.md
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

<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<codeStyleSettings language="XML">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
<arrangement>
<rules>
<section>
<rule>
### 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:
@bkamber
bkamber / instantiate.html
Created December 20, 2015 04:48 — forked from pblca/instantiate.html
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'
});