Skip to content

Instantly share code, notes, and snippets.

ADB_COMANDS


1

--- | adb devices | вывод списка подключенных устройств |
| adb reboot | перезагрузка устройства |
| adb reboot recovery | перезагрузка устройства в режим восстановления (recovery) |
| adb reboot bootloader | перезагрузка устройства в режим fastboot для дальнейшего выполнения fastboot-команд |

@gevaertw
gevaertw / ArchiSQLGenerator.ajs
Last active May 14, 2024 20:36
#jarchi #ArchiSQLGenerator
/*
The goal is that a user creates a pattern on a view. Based on that pattern a SQL query is created to analyse the entire model for that view.
The model must be in a database created with herve database plugin (Link) This is very powerfull to analyse the model using SQL and by further extention BI tools like PowerBI
Check https://gevaertw.wordpress.com/generating-sql-queries-for-the-archi-database for more info
*/
//
//-------------------------- Script Settings --------------------------------------------------------------
// to set language comment or uncomment
@robkamp
robkamp / ColorElements.ajs
Last active May 14, 2024 20:35
#jArchi Color the selected elements with web safe colors
// Author: Rob Kamp
// Requires: jArchi - https://www.archimatetool.com/blog/2018/07/02/jarchi/
// Purpose: Color the selected elements with web safe colors
// Date: 2019-11-20
// Version 1.1
// Change: changed the title to add the #jArchi tag
console.log("Start: Color the selected elemets");
// Web safe colors
@jbsarrodie
jbsarrodie / Merge multiple concepts (and delete others).ajs
Last active May 14, 2024 20:34
#jArchi script to merge multiple concepts (and delete others)
// Merge multiple concepts (and delete others)
//
// Requires jArchi - https://www.archimatetool.com/blog/2018/07/02/jarchi/
//
// This script merges multiple concepts (and delete others)
//
// Version 1.1 (2020/01/20) Add an option to keep only the content of the "target" concept
// Version 1.0 (2019/11/12) First version published
//
// Known limitation: works only on elements, not relationships
@jbsarrodie
jbsarrodie / Delete unused elements and relationships.ajs
Created March 2, 2020 15:33
#jArchi scripts to delete any element (or relationship) not used in at least one view
// Delete unused elements and relationships
//
// Requires jArchi - https://www.archimatetool.com/blog/2018/07/02/jarchi/
//
// This script will delete any element or relationship not used in at least one view
//
// (c) 2020 Jean-Baptiste Sarrodie
var response = window.confirm("This script will delete any element or relationship not used in at least one view. Continue?");
<!DOCTYPE html>
<html>
<head>
<style>
.editor { font-family: 'Roboto Mono', monospace; font-size: 12px; outline: none; overflow-y: auto; padding-left: 48px; counter-reset: line; }
.editor div { display: block; position: relative; white-space: pre-wrap; }
.editor div::before { content: counter(line); counter-increment: line; position: absolute; right: calc(100% + 16px); opacity: 0.5; }
</style>
</head>
@timolaine
timolaine / Insert Labels of Related Elements.ajs
Last active May 14, 2024 20:34
Insert Labels of Related Elements in Archi
@nymous
nymous / README.md
Last active May 14, 2024 20:34
Logging setup for FastAPI, Uvicorn and Structlog (with Datadog integration)

Logging setup for FastAPI

This logging setup configures Structlog to output pretty logs in development, and JSON log lines in production.

Then, you can use Structlog loggers or standard logging loggers, and they both will be processed by the Structlog pipeline (see the hello() endpoint for reference). That way any log generated by your dependencies will also be processed and enriched, even if they know nothing about Structlog!

Requests are assigned a correlation ID with the asgi-correlation-id middleware (either captured from incoming request or generated on the fly). All logs are linked to the correlation ID, and to the Datadog trace/span if instrumented. This data "global to the request" is stored in context vars, and automatically added to all logs produced during the request thanks to Structlog. You can add to these "global local variables" at any point in an endpoint with `structlog.contextvars.bind_contextvars(custom

@jayluxferro
jayluxferro / Kali_Desktop_Environments_Installation_and_Removal.md
Last active May 14, 2024 20:33
Kali Desktop Environments Installation and Removal

XFCE Desktop


How to install XFCE Desktop Environment in Kali Linux:

Command:

apt-get install kali-defaults kali-root-login desktop-base xfce4 xfce4-places-plugin xfce4-goodies

How to remove XFCE in Kali Linux:

Command:

@xxRockOnxx
xxRockOnxx / laravel-tinker-login-session.md
Last active May 14, 2024 20:33
Laravel Tinker: login as another user and generate an injectable session cookie

Generating session cookie

  • Enter Laravel Tinker
php artisan tinker
  • Authenticate