Skip to content

Instantly share code, notes, and snippets.

View neuro-sys's full-sized avatar
💭
💾

Fırat Salgür neuro-sys

💭
💾
View GitHub Profile
@neuro-sys
neuro-sys / README.md
Created March 29, 2018 15:26 — forked from boneskull/README.md
example of how to debug mocha v4 if hanging

Here's an example of how to debug Mocha v4 if it hangs.

Ensure you're using a Node.js 8 or newer (or any version with async_hooks support).

If you run your test, you'll notice it hangs:

$ mocha test.js
@neuro-sys
neuro-sys / incbin.c
Created February 27, 2017 17:33 — forked from mmozeiko/incbin.c
Include binary file with gcc
#include <stdio.h>
#define STR2(x) #x
#define STR(x) STR2(x)
#define INCBIN(name, file) \
__asm__(".section .rodata\n" \
".global incbin_" STR(name) "_start\n" \
".type incbin_" STR(name) "_start, @object\n" \
".balign 16\n" \
@neuro-sys
neuro-sys / incbin.c
Created February 27, 2017 17:33 — forked from mmozeiko/incbin.c
Include binary file with gcc
#include <stdio.h>
#define STR2(x) #x
#define STR(x) STR2(x)
#define INCBIN(name, file) \
__asm__(".section .rodata\n" \
".global incbin_" STR(name) "_start\n" \
".type incbin_" STR(name) "_start, @object\n" \
".balign 16\n" \

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>