Skip to content

Instantly share code, notes, and snippets.

@eloraiby
eloraiby / STM32F103.md
Last active May 10, 2024 14:30
Setup Stm32f103 blue pill under vscode

stm32f103 Blue pill C/C++ programming

In STM32CubeMX, enable debugging: Pinout & Configuration > System Core > SYS > Mode > Debug: Enable.

Then under Project Manager > Toolchain/IDE: Makefile

Inside VSCode, add a configuration in launch.json:

        {
            "name": "GDB",
@Uchux
Uchux / impossible-checkbox-v2.markdown
Created May 10, 2024 14:29
Impossible Checkbox v2 🐻

Impossible Checkbox v2 🐻

Revisiting one of my favorite pens to update the React side of it and add sound

A Pen by Uchux_NBA on CodePen.

License.

@ChunMinChang
ChunMinChang / Linux.md
Last active May 10, 2024 14:29
Building gecko

Building Firefox on Linux

Get [mozilla-central][mozilla-central] via [git-cinnabar][cinnabar]

  1. Check if git is installed in your system
  2. Open terminal
    # Clone your own gecko repository
    git clone https://github.com/<your_username>/gecko-dev.git
    
@ahtcx
ahtcx / deep-merge.js
Last active May 10, 2024 14:29
Deep-Merge JavaScript objects with ES6
// ⚠ IMPORTANT: this is old and doesn't work for many different edge cases but I'll keep it as-is for any of you want it
// ⚠ IMPORTANT: you can find more robust versions in the comments or use a library implementation such as lodash's `merge`
// Merge a `source` object to a `target` recursively
const merge = (target, source) => {
// Iterate through `source` properties and if an `Object` set property to merge of `target` and `source` properties
for (const key of Object.keys(source)) {
if (source[key] instanceof Object) Object.assign(source[key], merge(target[key], source[key]))
}
@kapb14
kapb14 / base.html
Created October 17, 2018 07:14
Flask simplest realtime log file viewer
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" dir="ltr" class="uk-height-1-1">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>flasktest</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css" />
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
1. Convert our ".jks" file to ".p12" (PKCS12 key store format):
keytool -importkeystore -srckeystore oldkeystore.jks -destkeystore newkeystore.p12 -deststoretype PKCS12
1.1. To List out new keysrore File :
keytool -deststoretype PKCS12 -keystore newkeystore.p12 -list
2. Extract pem (certificate) from ".p12" keysotre file:
@ramantehlan
ramantehlan / README-Fancy.md
Last active May 10, 2024 14:28
README template I use for most of my projects.

Introduction

  • Add your project logo.
  • Write a short introduction to the project.
  • If you are using badges, add them here.

📒 Index

@travisbrown
travisbrown / rjs-deleted.md
Created May 4, 2021 05:55
Deleted tweets by Ryan Singer

Deleted tweets for rjs

The list below includes 3098 deleted tweets by rjs.

There are also 2 tweets that are indicated as not currently deleted by the Twitter API that have been scraped from pages of deleted tweets (as replies, etc.). These possibly undeleted tweets are included for context and are indicated by a (live) link.

@liortal53
liortal53 / DecoratorEditor.cs
Last active May 10, 2024 14:28
Extend Unity's built-in inspectors
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEditor;
using UnityEngine;
/// <summary>
/// A base class for creating editors that decorate Unity's built-in editor types.
/// </summary>
public abstract class DecoratorEditor : Editor
@mjbalcueva
mjbalcueva / password-input.tsx
Last active May 10, 2024 14:28
shadcn ui custom password input
"use client"
import { forwardRef, useState } from "react"
import { EyeIcon, EyeOffIcon } from "lucide-react"
import { Button } from "@/components/ui/button"
import { Input, InputProps } from "@/components/ui/input"
import { cn } from "@/lib/utils"
const PasswordInput = forwardRef<HTMLInputElement, InputProps>(
({ className, ...props }, ref) => {