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
| make clean | |
| emconfigure ./configure --host=x86_64-gnu-linux --prefix=$(readlink -f prefix) --disable-imager --disable-defrag --disable-tls --disable-uuidd --disable-mmp --disable-tdb --disable-bmap-stats --disable-nls --disable-fuse2fs --disable-fsck --disable-libuuid --without-pthread CFLAGS="" | |
| cp -f ../e2fsprogs/lib/ext2fs/gen_crc32ctable ./lib/ext2fs/gen_crc32ctable | |
| cp -f ../e2fsprogs/util/subst ./util/subst | |
| chmod +x ./util/subst | |
| emmake make | |
| echo 'resize2fs.js: $(RESIZE_OBJS) $(DEPLIBS) |
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
| const zbug = (...args: any[]) => { | |
| const stack = ((new Error).stack?.split('\n') as any[]) | |
| .map((line: string) => line.substring(line.lastIndexOf('/') + 1)); | |
| const _args: any[] = [...stack?.slice(2,3), ...args]; | |
| // @ts-ignore | |
| return _debug('node-raspberrypi-usbboot')(..._args); | |
| } |
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
| FROM ubuntu | |
| RUN apt-get update | |
| RUN apt-get install -yqq apt-utils | |
| RUN apt-get install -yqq vim | |
| # # device tree | |
| RUN apt-get install -yqq i2c-tools | |
| RUN apt-get install -yqq device-tree-compiler | |
| # dtc -I fs /sys/firmware/devicetree/base > cur.dts |
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
| /dts-v1/; | |
| / { | |
| compatible = "compulab,sbc-imx8\0compulab,cl-som-imx8,rev1.1\0compulab,cl-som-imx8\0fsl,imx8mq"; | |
| interrupt-parent = <0x01>; | |
| #address-cells = <0x02>; | |
| #size-cells = <0x02>; | |
| model = "CompuLab CL-SOM-iMX8 rev1.1 on SBC-iMX8"; | |
| cpus { |
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
| // Simple Public Service Announcement | |
| // You can add variables to your variables on console.log | |
| // by using the es6 shorthand | |
| ```js | |
| console.log({variable}) | |
| ``` | |
| // I just realized that |
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
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "lldb", | |
| "request": "launch", | |
| "name": "Cargo test", | |
| "cargo": { | |
| "args": ["test", "--no-run", "--lib"] | |
| }, |
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
| // Place your key bindings in this file to override the defaults | |
| [ | |
| { | |
| "key": "ctrl+`", | |
| "command": "workbench.action.terminal.focus", | |
| "when": "editorTextFocus" | |
| }, | |
| { | |
| "key": "ctrl+`", | |
| "command": "workbench.action.focusActiveEditorGroup", |
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 | |
| PY2_CONFIG_DIR=$(sudo find /usr/lib -type d -regex ".*python2.[0-9]/config[^/]*") | |
| PY3_CONFIG_DIR=$(sudo find /usr/lib -type d -regex ".*python3.[0-9]/config[^/]*") | |
| if ( [ -d "$PY2_CONFIG_DIR" ] || [ -d "$PY3_CONFIG_DIR" ] ) ; then | |
| py2_arg="--with-python-config-dir=$PY2_CONFIG_DIR" | |
| py3_arg="--with-python3-config-dir=$PY3_CONFIG_DIR" | |
| fi |
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
| package main | |
| import ( | |
| "fmt" | |
| "sync" | |
| ) | |
| type Fetcher interface { | |
| Fetch(url string) (body string, urls []string, err error) | |
| } |
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 | |
| # force kill process by port | |
| # Usage: "force-kill PORT" | |
| sudo netstat -tulnp | grep "$1" | sed -r -e "s/.*LISTEN\\s+([0-9]+).*/\1/" | xargs sudo kill -9 |