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
// Basic demo for accelerometer readings from Adafruit MPU6050 | |
#include <Adafruit_MPU6050.h> | |
#include <Wire.h> | |
#include <BLEDevice.h> | |
#include <BLEUtils.h> | |
#include <BLEServer.h> | |
#include "driver/pcnt.h" |
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" | |
"io" | |
"log" | |
"os" | |
"strings" |
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
#define PIN01 9 | |
#define PIN02 8 | |
#define PIN03 7 | |
#define PIN04 6 | |
#define PIN05 5 | |
#define PIN06 4 | |
#define PIN07 3 | |
#define PIN08 2 | |
#define PIN09 11 |
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 ( | |
"encoding/hex" | |
"fmt" | |
) | |
func main() { | |
const sample = "54747A0E4ACF4161D00D244ED341F4329E1E02" |
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
cat > ~/.gnupg/gpg-agent.conf <<EOF | |
default-cache-ttl 600 | |
max-cache-ttl 7200 | |
enable-ssh-support | |
EOF | |
gpgconf --kill gpg-agent | |
gpg-connect-agent reloadagent /bye | |
# man gpg-agent |
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
<div id="main"> | |
<div id="window"> | |
<div class="parent"></div> | |
</div> | |
</div> | |
<style> | |
div#main { | |
width: 100%; | |
} |
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 hanabi | |
import ( | |
"math/rand" | |
"time" | |
) | |
const ( | |
white = iota | |
yellow |
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
x | |
x x | |
xx xx xx | |
x x xx xx | |
xx x x xx | |
xx x x xx x x | |
x x x | |
x x | |
xx |
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
#!/bin/bash | |
# monitor STDIN | |
# run command when interval of lines come in smaller than sepecific duration | |
DURATION=2 # in seconds | |
LINES_COUNT=1 | |
COMMAND="echo Aha!" | |
SECONDS=$DURATION |
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 "PinChangeInterrupt.h" | |
// Choose a valid PinChangeInterrupt pin of your Arduino board | |
#define pcintThrottle 12 // A4 | |
#define pcintAileron 13 // A5 | |
/* #define pcintThrottle 13 // A4 */ | |
volatile int thro_pwm_value = 0; | |
volatile int thro_prev_time = 0; | |
volatile int aile_pwm_value = 0; |
NewerOlder