Skip to content

Instantly share code, notes, and snippets.

"use client";
import {
Dialog,
DialogContent,
DialogTitle,
DialogTrigger
} from "@/components/ui/dialog";
import useDragDrop from "@/hooks/useDragDrop";
import { cn, formatBytes } from "@/lib/utils";
/*
Valve 01.
*/
#include "LowPower.h"
#include "RTClib.h"
const int MOTOR_ENA = 6;
const int MOTOR_IN1 = 8;
const int MOTOR_IN2 = 9;
const int MOTOR_ENA = 6;
const int MOTOR_IN1 = 7;
const int MOTOR_IN2 = 8;
const int ENCODER_PIN = 2;
const int ENCODER_PERIOD = 16;
// Approximate bounce duration of IR sensor.
// Ignore noisy readings during this time period.
const int BOUNCE_DURATION = 50; // milliseconds
Δ uname
Darwin
Δ tf version
Terraform v0.13.0-rc1
Δ tree
.
├── database.tf
├── modules
Δ uname
Darwin
Δ cat versions.tf
terraform {
required_version = ">= 0.13"
required_providers {
snowflake = {
source = "terraform.registry.io/peak/snowflake"
version = ">= 0.13.2"
@igungor
igungor / rate-limited-reader.go
Created September 19, 2017 06:53
Rate limited io.Reader
package main
import (
"bytes"
"context"
"fmt"
"io"
"io/ioutil"
"log"
"time"
@igungor
igungor / expbackoff.go
Created September 19, 2017 06:52
Exponential backoff without jitter (also without bloat)
// you dont need some fancy exponential backoff packages with unnecessary
// bloats. this is fine.
package main
import "time"
func main() {
backoff = time.Duration(0)
for {
backoff = exponential(backoff)
@igungor
igungor / gor-mw.go
Created September 19, 2017 06:51
goreplay middleware that adds a query string to a URL
package main
import (
"bufio"
"bytes"
"encoding/hex"
"log"
"os"
"strconv"
"time"

Keybase proof

I hereby claim:

  • I am igungor on github.
  • I am igungor (https://keybase.io/igungor) on keybase.
  • I have a public key whose fingerprint is 5C30 96AB 9C53 E8BF 34FF F0EE 884C DE07 E7D9 6A98

To claim this, I am signing this object:

@igungor
igungor / manga.sh
Created May 3, 2012 22:02
Manga converter for Kindle screen
#!/bin/bash
if [ ! -x $(which gm) ]
then
echo "GraphicsMagick is required."
exit 1
fi
TMPDIR=$(mktemp -d)