This file contains hidden or 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
| #!/usr/bin/env ruby | |
| # Dump firmware from nrf51 and maybe other cortex-m devices | |
| # The script thats missing from http://blog.includesecurity.com/2015/11/NordicSemi-ARM-SoC-Firmware-dumping-technique.html | |
| # Also inspired by https://tasteless.eu/post/2015/12/32c3ctf-emb400/ | |
| # Requires seperate instace gdb server already running, for my jlink I use | |
| # openocd -f interface/jlink.cfg -c "adapter_khz 2000; transport select swd;" -f target/nrf51.cfg | |
| # uicr and ficr are always accessible so you might want to dump those externally and compare? | |
| # openocd -f interface/jlink.cfg -c "adapter_khz 2000; transport select swd; set WORKAREASIZE 0;" -f target/nrf51.cfg -c "init; reset halt; flash read_bank 1 uicr-normal.bin 0x0 0x100; exit" |
This file contains hidden or 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
| export const UPDATE_EDITOR_CONTENT = 'mock_test/UPDATE_EDITOR_CONTENT'; | |
| export const updateMockTestContent = (testId: number, content: string) => ({ | |
| type: UPDATE_EDITOR_CONTENT, | |
| testId, | |
| content, | |
| }); | |
| handlers[UPDATE_EDITOR_CONTENT] = (state, action) => { | |
| const { testId, content } = action; | |
| return state | |
| .setIn(['tests', 'items', testId, 'answer'], content) |
This file contains hidden or 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
| # install libraries | |
| sudo apt install git variety build-essential htop python3-pip curl openssh-server screen | |
| # install docker dependencies | |
| sudo snap install docker | |
| sudo groupadd docker | |
| sudo usermod -aG docker $USER | |
| pip3 install docker-compose | |
| snap install kubectl --classic |
This file contains hidden or 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
| E.setClock(160); | |
| var esp8266 = require("ESP8266"); | |
| console.log(esp8266.getState()); | |
| pinMode(D4, "output"); | |
| var numPixels = 8; | |
| var server = "x.x.x.x"; | |
| var options = { | |
| keep_alive: 60, | |
| port: 1883, |
This file contains hidden or 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
| # the condition checks if we're running inside rake assets:precompile | |
| if !defined?(::Rake::SprocketsTask) | |
| FOG_DIRECTORY = begin | |
| # try and see if the directory exists | |
| FOG_CONNECTION.directories.get(bucket_name) | |
| rescue Excon::Error::Forbidden | |
| # otherwise let's just create it | |
| FOG_CONNECTION.directories.create( | |
| key: bucket_name, | |
| public: false, |
This file contains hidden or 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
| array = (1..100).map do |num| | |
| return "fizzbuzz" if num % 3 == 0 && num % 5 == 0 | |
| return "fizz" if num % 3 == 0 | |
| return "buzz" if num % 5 == 0 | |
| num | |
| end | |
| puts array |
This file contains hidden or 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
| https://forum.arduino.cc/index.php?topic=441428.0 | |
| #include "TinyWireS.h" | |
| #define I2C_SLAVE_ADDR 0x25 | |
| #include "SoftwareSerial.h" | |
| const int Rx = 3; // this is physical pin 2 - you do not need to connect this to DFPlayer | |
| const int Tx = 4; // this is physical pin 3 - connect to RX pin on DFPlayer | |
| SoftwareSerial mySerial(Rx, Tx); |
This file contains hidden or 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
| 7zip (v:19.00) [main] | |
| arduino (v:1.8.10) [extras] | |
| audacity (v:2.3.2) [extras] | |
| firefox (v:70.0) [extras] | |
| git (v:2.23.0.windows.1) [main] | |
| hugo-extended (v:0.59.0) [main] | |
| kicad (v:5.1.4_1) [extras] | |
| nodejs (v:13.0.1) [main] | |
| nvm (v:1.1.7) [main] | |
| openssh (v:7.6p1) [main] |
This file contains hidden or 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
| tap "homebrew/bundle" | |
| tap "homebrew/cask" | |
| tap "homebrew/cask-fonts" | |
| tap "homebrew/core" | |
| brew "autoconf" | |
| brew "automake" | |
| brew "coreutils" | |
| brew "libyaml" | |
| brew "readline" | |
| brew "docker-compose" |
This file contains hidden or 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
| # starts postgres | |
| docker run --name postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 postgres | |
| # starts postgres with timescaledb | |
| docker run --name timescaledb -e POSTGRES_PASSWORD=postgres -p 5432:5432 timescale/timescaledb:1.0.0-pg10 |