Skip to content

Instantly share code, notes, and snippets.

@iotguider
iotguider / Interfacing_RGB_3_Color_LED_Module_KY-016_in_Raspberry_Pi.py
Created October 28, 2017 15:40
Code for Interfacing RGB 3 Color LED Module KY-016 in Raspberry Pi
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
RUNNING = True
green = 27
red = 17
blue = 22
@ingramchen
ingramchen / 00-ubuntu-intellij-macosx.md
Last active April 19, 2024 15:42
Use ubuntu/Intellij like macOS X

How to mimic full macOS Intellij behavior in Ubuntu

  • Enviroment
    • Ubuntu 20.04
    • Intellij IDEA 2020

Ubuntu gnome shell shortcuts

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 19, 2024 15:41
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@troyfontaine
troyfontaine / 1-setup.md
Last active April 19, 2024 15:41
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@kodekracker
kodekracker / draw_bounding_box_open_cv.py
Created June 20, 2018 18:31
To draw Bounding Box in a image using OpenCV python module
#!/usr/bin/env python
import cv2
import sys
def drawBoundingBoxes(imageData, imageOutputPath, inferenceResults, color):
"""Draw bounding boxes on an image.
imageData: image data in numpy array format
imageOutputPath: output image file path
inferenceResults: inference results array off object (l,t,w,h)
colorMap: Bounding box color candidates, list of RGB tuples.
@vasanthk
vasanthk / System Design.md
Last active April 19, 2024 15:40
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@yue1123
yue1123 / isEventSupported.js
Last active April 19, 2024 15:39
Determining whether a browser supports an event
function is( obj, type ) {
return typeof obj === type;
}
var isEventSupported = (function() {
var TAGNAMES = {
'select': 'input', 'change': 'input',
'submit': 'form', 'reset': 'form',
'error': 'img', 'load': 'img', 'abort': 'img'
@jb0gie
jb0gie / flutter.md
Created February 23, 2019 00:27 — forked from matteocrippa/flutter.md
Flutter Cheatsheet

Flutter

A quick cheatsheet of useful snippet for Flutter

Widget

A widget is the basic type of controller in Flutter Material. There are two type of basic Widget we can extend our classes: StatefulWidget or StatelessWidget.

Stateful

StatefulWidget are all the widget that interally have a dynamic value that can change during usage. It can receive an input value in the constructor or reference to functions. You need to create two classes like:

@wtw24
wtw24 / docker_rus.md
Last active April 19, 2024 15:37
Шпаргалка с командами Docker

Шпаргалка с командами Docker

1552317264965 1552317537397 1552317711879

1552318467562 1552318531067 1552318577900 1552318614839