Skip to content

Instantly share code, notes, and snippets.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active March 29, 2024 08:31
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@OrionReed
OrionReed / DOM3D.js
Last active March 29, 2024 08:31
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@izzqz
izzqz / learn.lua
Created December 2, 2020 22:11
Learn Lua in 15 Minutes
-- Source: http://tylerneylon.com/a/learn-lua/
-- Two dashes start a one-line comment.
--[[
Adding two ['s and ]'s makes it a
multi-line comment.
--]]
----------------------------------------------------
@jasonish
jasonish / suricata-windows.md
Last active March 29, 2024 08:28
Build/Develop Suricata on Windows

Build Suricata on Windows

The purpose of this document is to build Suricata on Windows for the purpose of development and CI. It does not cover installing or running Suricata on Windows.

Install MSYS2

URL: https://www.msys2.org/

@mbinna
mbinna / effective_modern_cmake.md
Last active March 29, 2024 08:28
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

Intro

A fine marzo 2024 è stata messa online la Piattaforma Unica Nazionale dei punti di ricarica per i veicoli elettrici, in cui sono visualizzabili su mappa o in elenchi - e non anche come dati grezzi e aperti - i punti di ricarica per veicoli elettrici presenti in Italia.

Lo saranno in futuro? Non è dato saperlo, ma è molto probabile che avvenga, perché lo prevedono le norme e lo raccomanda il buon senso.

Accesso dati

Navigando il sito con un browser (vedi immagine), si legge in chiaro che i dati sono esposti tramite API.

@ygit
ygit / SkipVerification.txt
Last active March 29, 2024 08:27
Skip Verification of Mac Apps
xattr -d com.apple.quarantine /path/to/app/myMacApp.app

Laboratory work I

Дронов Юрий Группа ИУ8-23

Homework

  1. Скачайте библиотеку boost с помощью утилиты wget. Адрес для скачивания https://sourceforge.net/projects/boost/files/boost/1.69.0/boost_1_69_0.tar.gz.
$ wget https://sourceforge.net/projects/boost/files/boost/1.69.0/boost_1_69_0.tar.gz
@shcallaway
shcallaway / README.md
Last active March 29, 2024 08:25
Use jq to parse JSON logs into something more readable

Structured logs are way better than normal logs for a whole bunch of reasons, but they can sometimes be a pain to read in the shell. Take this logline for example:

{"erlang_pid":"#PID<0.1584.0>","level":"error","message":"Got error when retry: :econnrefused, will retry after 1535ms. Have retried 2 times, :infinity times left.","module":"","release":"c2ef629cb357c136f529abec997426d6d58de485","timestamp":"2019-12-17T19:22:11.164Z"}

This format is hard for a human to parse. How about this format instead?

error | 2019-12-17T19:21:02.944Z | Got error when retry: :econnrefused, will retry after 1648ms. Have retried 2 times, :infinity times left.