Moved to: https://github.com/ceremcem/unlock-luks-partition
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
// Generated by LiveScript 1.4.0 | |
var sleep, rfid, stm, esp12, setup, rfidTest, run, onInit; | |
sleep = require('aea').sleep; | |
rfid = void 8; | |
stm = true; | |
esp12 = false; | |
setup = function(){ | |
var spiPins, cs; | |
if (stm && !esp12) { | |
console.log("----- this is STM32-DISCOVERY"); |
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
{sleep} = require \aea | |
rfid = void | |
stm = yes | |
esp12 = no | |
setup = -> |
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
Time [s] | Packet ID | MOSI | MISO | |
---|---|---|---|---|
0.303055 | 0 | 0x1A | 0x00 | |
0.30312275 | 1 | 0x07 | 0x0C | |
0.30462875 | 2 | 0x02 | 0x03 | |
0.3046855 | 3 | 0x00 | 0x00 | |
0.30586175 | 4 | 0x04 | 0x00 | |
0.30591625 | 5 | 0xF7 | 0x02 | |
0.30816125 | 6 | 0x08 | 0x00 | |
0.3082155 | 7 | 0x7F | 0x04 | |
0.31223675 | 8 | 0x14 | 0x7F |
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
Time [s] | Packet ID | MOSI | MISO | |
---|---|---|---|---|
0.81563 | 0 | 0x1A | 0x00 | |
0.81567875 | 0 | 0x07 | 0x0C | |
0.81610175 | 1 | 0x02 | 0x07 | |
0.8161505 | 1 | 0x00 | 0x00 | |
0.816457 | 2 | 0x04 | 0x00 | |
0.81650575 | 2 | 0xF7 | 0x02 | |
0.8168125 | 3 | 0x08 | 0xF7 | |
0.81686125 | 3 | 0x7F | 0x04 | |
0.81717 | 4 | 0x14 | 0x7F |
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
# TODO: Add tests | |
packet = "@00RD0000000157*\r" # a valid packet | |
query = (x) -> | |
// # check if input is a valid Hostlink query | |
# -------------------------------------------- | |
| /^@ # start header | |
| [0-3][0-9] # unit no, must be 00-31 |
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
#!/bin/bash | |
FOLDER=$1 | |
zip -r "${FOLDER%/}.zip" "${FOLDER%/}" |
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
TEST: function (){ | |
var a, b, result, expected; | |
a = { | |
a: 1, | |
b: 2, | |
c: { | |
ca: 1, | |
cb: 2 | |
} | |
}; |
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
# Run this script at http://livescript.net | |
export function merge _obj1, obj2, inplace=no | |
obj1 = unless inplace | |
JSON.parse JSON.stringify _obj1 | |
else | |
_obj1 | |
for p of obj2 | |
t-obj1 = typeof! obj1[p] | |
if typeof! obj2[p] is \Object |
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
#!/bin/bash | |
# for question at http://superuser.com/questions/1069702/how-to-expand-a-loop-iterating-over-an-array-dynamically-in-bash/1159076#1159076 | |
req="a b c d" | |
read -a MODULES <<<$req | |
i=0 | |
for ((i = 0; i < "${#MODULES[@]}"; i++)); do | |
MODULE_NAME=${MODULES[$i]} | |
echo $MODULE_NAME |