This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"strings" | |
"time" | |
"github.com/ituoga/the-system/pkg/tools" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <TimerOne.h> | |
const int encoderPinA = 2; // Connected to interrupt 0 (pin 2) | |
const int encoderPinB = 3; // Connected to interrupt 1 (pin 3) | |
const int stepPin = 9; | |
const int dirPin = 8; | |
// Variables to track encoder state | |
volatile int32_t encoderPositionX = 0; | |
volatile int32_t encoderPositionY = 0; | |
volatile int32_t encoderPositionZ = 0; | |
volatile bool lastEncodedState = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta name="theme-color" content="#0d085c"/> | |
<link rel="manifest" href="/manifest.json"/> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, Response | |
import time | |
app = Flask(__name__) | |
def root_dir(): # pragma: no cover | |
return os.path.abspath(os.path.dirname(__file__)) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
class MyArray extends HTMLElement { | |
constructor() { | |
super(); | |
this.store = {}; | |
const template = document.createElement("template"); | |
const id = Math.random().toString(36).substr(2, 9); | |
template.innerHTML = `<div id="input-${id}">hi</div>`; | |
this.shadow = this.attachShadow({ mode: "open" }); | |
this.shadow.appendChild(template.content.cloneNode(true)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyCustomElement extends HTMLElement { | |
constructor() { | |
super(); | |
const template = document.createElement('template'); | |
template.id = 'pool-calculator-template'; | |
template.innerHTML = ` | |
<input type="text" id="input"/> | |
`; | |
// this.appendChild(template); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"net/http" | |
) | |
type MyContext struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net/http" | |
"time" | |
"github.com/r3labs/sse/v2" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use App\Models\User; | |
test('Action', function () { | |
app()->singleton(ClassInterface::class, T1Impl::class); | |
$out1 = app(ClassInterface::class)(); | |
$this->assertEquals("T1?", $out1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"github.com/gorilla/websocket" | |
"io" | |
"log" | |
"net/http" | |
"os/exec" |
NewerOlder