Skip to content

Instantly share code, notes, and snippets.

Avatar

Denys Bushulyak Denys-Bushulyak

  • Grasp Studio
  • Ukraine
View GitHub Profile
@Denys-Bushulyak
Denys-Bushulyak / main.rs
Last active Nov 16, 2022
Point to Structure in Rust in 2 versions
View main.rs
#[allow(dead_code)]
#[derive(Debug, Copy, Clone)]
struct A<'text> {
foo: &'text str,
baz: i32,
}
fn ptr_to_struct(p: *const A) {
let b: A = unsafe { *p }; // main part of this example!
println!("{:#?}", b);
@Denys-Bushulyak
Denys-Bushulyak / .vimspector.json
Created Aug 29, 2021
Vimspector Jest debug configuration for @nrwl nx
View .vimspector.json
{
"configurations": {
"run": {
"adapter": "vscode-node",
"configuration": {
"type": "node",
"request": "launch",
"name": "Jest Current File",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@Denys-Bushulyak
Denys-Bushulyak / xdebug.ini
Created Oct 22, 2017
Configuration for debuging php from container
View xdebug.ini
error_log = /dev/stdout
log_errors = On
display_errors = On
display_startup_errors = On
error_reporting = -1
xdebug.remote_enable = On
xdebug.remote_autostart = On
xdebug.remote_host = 192.168.137.111 #Your pc network address
xdebug.remote_port = 9001
@Denys-Bushulyak
Denys-Bushulyak / docker-compose.debug.yaml
Created Oct 22, 2017
Xdebug docker container (or service at swarm) configuration
View docker-compose.debug.yaml
version: "2"
services:
application:
image: php
environment:
— PHP_IDE_CONFIG=serverName=app.local #this is main part. And yes this is whitout quotation marks - it's requiring - wroted by blood :).
@Denys-Bushulyak
Denys-Bushulyak / docker-stack.yml
Last active Dec 19, 2017
Nginx proxy docker swarm example
View docker-stack.yml
version: "3.3"
volumes:
proxy:
networks:
proxy_network:
backend_network: #For connection another stacks to proxy. Should be created manualy.
external: true