Skip to content

Instantly share code, notes, and snippets.

View ilmsg's full-sized avatar
😍
love me love my bug

Eak Netpanya ilmsg

😍
love me love my bug
View GitHub Profile
@rajeshpachaikani
rajeshpachaikani / main.rs
Last active August 13, 2025 07:28
Face and Eye detection using Opencv On Rustlang
use opencv::{
Result,
prelude::*,
objdetect,
highgui,
imgproc,
core,
types,
videoio,
};
@bluzky
bluzky / request_helper.ex
Last active September 8, 2025 12:01
Elixir download/stream large file with hackney
defmodule RequestHelper do
@moduledoc """
Reference from https://gist.github.com/avdi/7990684
Stream download large file from url
"""
require Logger
@doc """
Get stream data from url
mode could be `:binary` or `:line`
@PJUllrich
PJUllrich / big-o.md
Last active December 14, 2025 22:47
Big-O Time Complexities for Elixir Data Structures

Big-O Time Complexities for Elixir data structures

Map [1]

Operation Time Complexity
Access O(log n)
Search O(log n)
Insertion O(n) for <= 32 elements, O(log n) for > 32 elements [2]
Deletion O(n) for <= 32 elements, O(log n) for > 32 elements
@Ice3man543
Ice3man543 / main.go
Created April 8, 2021 19:03
Golang MongoDB connection example
package main
import (
"context"
"time"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
"go.mongodb.org/mongo-driver/mongo/readpref"
)
@N3MIS15
N3MIS15 / beacon.py
Last active October 28, 2025 23:26
micropython iBeacon example
import struct
import ubluetooth as bt
from micropython import const
MANUFACTURER_ID = const(0x004C)
DEVICE_TYPE = const(0x02)
DATA_LENGTH = const(0x15)
BR_EDR_NOT_SUPPORTED = const(0x04)
FLAG_BROADCAST = const(0x01)
MANUFACTURER_DATA = const(0xFF)
@m99coder
m99coder / web_crawler.go
Created March 10, 2021 12:44
Mutual exclusion with mutex
package main
import (
"fmt"
"sync"
)
type Fetcher interface {
// Fetch returns the body of URL and
// a slice of URLs found on that page.
<div class="container" *ngIf="userLoggedIn">
.... visible only to authenticated users
<button *ngIf="user.admin">Delete User</button>
</div>
@kevwan
kevwan / dockerfile.md
Last active November 5, 2022 01:26
The simplest way to write Dockerfile!

1. choose a simple linux image

For example alpine, it's only about 5MB.

2. set timezone if necessary

RUN apk add --no-cache tzdata
ENV TZ America/New_York
@przbadu
przbadu / react_on_docker2.md
Created October 29, 2020 04:31
Docker configuration to run react app

Setup docker to run React app

After setting up docker to generate React app without installing node js in https://gist.github.com/przbadu/4a62a5fc5f117cda1ed5dc5409bd4ac1 It was confusing to some of the devs, how to run react app, so I am creating this as second step to the configuration.

Generate required files in your react project

cd my-react-app
touch Dockerfile Dockerfile.dev docker-compose.yml .dockerignore
@smrfeld
smrfeld / .gitlab-ci.yml
Last active August 13, 2021 09:20
GitLab CI for firebase functions
image: node:12.13.0-alpine
before_script:
- npm i -g firebase-tools
test-functions:
stage: test
script:
- cd functions
- npm install