Skip to content

Instantly share code, notes, and snippets.

@alex-bender
alex-bender / sshpass.py
Created July 31, 2017 07:01 — forked from virtuald/sshpass.py
Simple python wrapper to give SSH a password for automation purposes (with output capture)
#!/usr/bin/env python3
import os
import sys
_b = sys.version_info[0] < 3 and (lambda x:x) or (lambda x:x.encode('utf-8'))
def ssh_exec_pass(password, args, capture_output=False):
'''
Wrapper around openssh that allows you to send a password to
@CAFxX
CAFxX / golang_minimize_allocations.md
Last active May 8, 2024 12:51
Minimize allocations in Go

📂 Minimize allocations in Go

A collection of tips for when you need to minimize the number of allocations in your Go programs.

Use the go profiler to identify which parts of your program are responsible for most allocations.

⚠️ Never apply these tricks blindly (i.e. without measuring the actual performance benefit/impact). Most of these tricks cause a tradeoff between reducing memory allocations and other aspects (including e.g. higher peak memory usage, higher CPU usage, lower maintainability, higher probability of introducing subtle bugs). Only apply these tricks if the tradeoff in every specfic case is globally positive.

Protobuf

@ruvnet
ruvnet / React-flow-Python.md
Last active May 8, 2024 12:50
This tutorial demonstrates how to create a basic Python Flask implementation with React Flow.

Building Complex Drag & Drop Visual AI Workflows with React Flow and Python Flask

Created by @rUv

React Flow Showcase Image

This tutorial demonstrates how to create a Python Flask implementation with React Flow to build complex AI workflows, reasoning systems, and comprehension modeling tools.

React Flow is a powerful open-source library for building interactive node-based interfaces in React applications. Its flexibility and extensibility make it an excellent choice for creating sophisticated AI applications.

@Pavelrst
Pavelrst / tmux-cheatsheet.markdown
Last active May 8, 2024 12:49 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new with session name:

tmux new -s myname

attach to named:

tmux a -t myname
@Pulimet
Pulimet / AdbCommands
Last active May 8, 2024 12:46
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@SietsevanderMolen
SietsevanderMolen / qubes_i3status.sh
Last active May 8, 2024 12:44
Feeds i3bar with current Qubes system status
#!/bin/bash
# By @minad and @SietsevanderMolen
WIFI_VM="sys-net"
json() {
if [[ -n "$3" ]]; then
echo -n "{\"name\":\"$1\",\"color\":\"$3\",\"full_text\":\"$2\"},"
else
echo -n "{\"name\":\"$1\",\"full_text\":\"$2\"},"
@SietsevanderMolen
SietsevanderMolen / qubes_autostart_xdg.sh
Created May 22, 2016 10:52
Start all entries in xdg autostart dir
autostart_etc=${XDG_CONFIG_DIRS-/etc/xdg}/autostart
autostart_home=${XDG_CONFIG_HOME-~/.config}/autostart
shopt -s nullglob
for i in $autostart_etc/*.desktop $autostart_home/*.desktop; do
if ! grep -q "OnlyShowIn=" "$i"; then
$(grep "Exec=" "$i" | sed 's/Exec=//') &
fi
done
@SietsevanderMolen
SietsevanderMolen / qubes_domain_terminal.sh
Last active May 8, 2024 12:43
Opens a terminal in the domain belonging to the current active winow
#!/bin/bash
run_terminal='
for t in $TERMINAL urxvt rxvt terminator Eterm aterm xterm gnome-terminal roxterm xfce4-terminal; do
which $t > /dev/null 2>&1 && exec $t;
done
'
get_id() {
local id=$(xprop -root _NET_ACTIVE_WINDOW)
@taulant
taulant / fjalori-i-shqipes-se-sotme-1980.json
Last active May 8, 2024 12:42
Fjalor i Shqipes se sotme (1980) - Akademia e Shkencave e RPS të Shqipërisë: Instituti i Gjuhësisë dhe i Letërsisë
This file has been truncated, but you can view the full file.
{
"dictionary": {
"abazhur": {
"word": "Abazhur",
"description": ",~I m. sh. ~\u00cb, ~\u00cbT. Mbules\u00eb prej qelqi, prej metali ose prej nj\u00eb l\u00ebnde tjet\u00ebr, q\u00eb sh\u00ebrben p\u00ebr ta mbledhur drit\u00ebn e llamb\u00ebs elektrike n\u00eb nj\u00eb drejtim, p\u00ebr t\u00eb mbrojtur syt\u00eb nga drita e forte ose p\u00ebr zbjilcurim; mb\u00ebshtet\u00ebsja p\u00ebr llamb\u00ebn bashk\u00eb me k\u00ebt\u00eb mbules\u00eb."
},
"abc": {
"word": "Abc",
"description": "[lexo: ab\u00ebc\u00eb], ~JA . shih AB\u00cbC\u00cb,~JA. Abc-ja e shqipes. Abc-ja e edukat\u00ebs. M\u00ebsoj abc-n\u00eb."

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?