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
# Elixir Type specs cleaner v1.0.1 | |
# | |
# I wanted to understand the time cost of having type specs in practically all | |
# our modules of a large Elixir codebase since, by using remote structs on type | |
# specs instead of struct references that would become a compile time | |
# dependency, we already saw some time improvements. | |
# | |
# Good (using `Bar.t`): `@spec foo(String.t) :: Bar.t` | |
# Bad (using `%Bar{}`): `@spec foo(String.t) :: %Bar{}` | |
# |
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
__author__ = 'dkarchmer' | |
''' | |
This script emulates a stand-alone Python based client. It relies on Boto3 to access AWS, but | |
requires your Django server to have an API for your user to access Cognito based credentials | |
Because of Cognito, the client (this script) will only get temporary AWS credentials associated | |
to your user and only your user, and based on whatever you configure your AIM Policy to be. | |
Most Cognito examples demonstrate how to use Cognito for Mobile Apps, so this scripts demonstrate | |
how to create a stand-alone Python script but operating similarly to these apps. |
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
__author__ = 'dkarchmer' | |
''' | |
This script emulates a stand-alone Python based client. It relies on Boto3 to access AWS, but | |
requires your Django server to have an API for your user to access Cognito based credentials | |
Because of Cognito, the client (this script) will only get temporary AWS credentials associated | |
to your user and only your user, and based on whatever you configure your AIM Policy to be. | |
Most Cognito examples demonstrate how to use Cognito for Mobile Apps, so this scripts demonstrate | |
how to create a stand-alone Python script but operating similarly to these apps. |
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
defmodule ElixirKeeb.ManualConfig do | |
@moduledoc """ | |
Manually create a Keyboard HID and writes to its device. | |
""" | |
@usb_gadget_root "/sys/kernel/config/usb_gadget" | |
def configure_device do | |
create_gadget_dir("mygadget") |
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
diff --git a/config/custom_rpi0.exs b/config/custom_rpi0.exs | |
new file mode 100644 | |
index 0000000..b551d92 | |
--- /dev/null | |
+++ b/config/custom_rpi0.exs | |
@@ -0,0 +1,15 @@ | |
+use Mix.Config | |
+ | |
+config :nerves_network, | |
+ regulatory_domain: "EU" |
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
diff --git a/linux-4.19.defconfig b/linux-4.19.defconfig | |
index c508772..fcb9dfa 100644 | |
--- a/linux-4.19.defconfig | |
+++ b/linux-4.19.defconfig | |
@@ -210,7 +210,8 @@ CONFIG_SND_SIMPLE_CARD=m | |
# CONFIG_HID_GENERIC is not set | |
CONFIG_USB_DWC2=m | |
CONFIG_USB_GADGET=y | |
-CONFIG_USB_CDC_COMPOSITE=y | |
+CONFIG_USB_CONFIGFS=m |
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
diff --git a/mix.exs b/mix.exs | |
index f9be22c..0bac063 100644 | |
--- a/mix.exs | |
+++ b/mix.exs | |
@@ -1,7 +1,7 @@ | |
-defmodule NervesSystemRpi0.MixProject do | |
+defmodule MinefieldCustomNervesRpi0.MixProject do | |
use Mix.Project | |
- @app :nerves_system_rpi0 |
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
~/projs/personal/minefield | |
❯ ssh nerves.local | |
Interactive Elixir (1.8.1) - press Ctrl+C to exit (type h() ENTER for help) | |
Toolshed imported. Run h(Toolshed) for more info | |
RingLogger is collecting log messages from Elixir and Linux. To see the messages, either attach the current IEx session to the logger: | |
RingLogger.attach | |
or print the next messages in the log: |
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
~/projs/personal/minefield | |
❯ mix firmware | |
Nerves environment | |
MIX_TARGET: rpi0 | |
MIX_ENV: dev | |
==> socket | |
Compiling 11 files (.ex) | |
Generated socket app |
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
~/projs/personal/minefield | |
❯ export MIX_ENV=dev MIX_TARGET=rpi0 | |
~/projs/personal/minefield | |
❯ mix deps.get | |
Resolving Hex dependencies... | |
Dependency resolution completed: | |
Unchanged: | |
artificery 0.4.1 | |
distillery 2.0.12 |
NewerOlder