Skip to content

Instantly share code, notes, and snippets.

@demirdegerli
demirdegerli / ubuntu_debloater.sh
Last active April 19, 2024 18:07
Ubuntu Debloater
#!/bin/sh
if [ "$(whoami)" != "root" ]; then
echo "Please run this script as root."
exit
fi
printf "This script will\n\n- Remove Snap\n- Install the deb version of Firefox\n- Install Flatpak\n- Optionally replace Ubuntu Desktop with GNOME\n\n"
read -p "Continue? (Y/n) " start_prompt
case $start_prompt in
[nN] | [nN][oO] )
exit
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@gsuberland
gsuberland / MoveDisplays.cs
Created November 25, 2021 04:08
Move displays programmatically on Windows in C#
// quick bit of code to move displays to specific locations in C#
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct DEVMODE
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
public string dmDeviceName;
public short dmSpecVersion;
public short dmDriverVersion;
@wojteklu
wojteklu / clean_code.md
Last active April 19, 2024 18:00
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@dhh
dhh / linux-setup.sh
Last active April 19, 2024 17:57
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl docker.io \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@devfraga
devfraga / readme.md
Last active April 19, 2024 17:55
README para os projetos pessoais

Logo do projeto

Nome do Projeto

Uma breve descrição do projeto aqui.

🔥 Introdução

Coloque aqui as instruções e quais são os objetivos desse projeto, funcionalidades.

@genesysflow
genesysflow / .md
Last active April 19, 2024 17:55
ufw ports for mailcow

ports for mailcow

ufw allow 25/tcp
ufw allow 465/tcp
ufw allow 587/tcp
ufw allow 143/tcp
ufw allow 993/tcp
ufw allow 110/tcp
ufw allow 995/tcp
ufw allow 4190/tcp
@rsms
rsms / Implementing Software Timers.md
Created October 13, 2012 08:14
This column will describe a set of functions to implement software timers.

Implementing Software Timers

By Don Libes

Originally appeared in the Nov. 1990 "C User's Journal" and is also reprinted as Chapter 35 of "Obfuscated C and Other Mysteries", John Wiley & Sons, 1993, ISBN 0-471-57805-3. http://www.wiley.com/compbooks/m3.html.

This column will describe a set of functions to implement software

My 2Do tasks

This is just contents of my never ending lists of tasks I tagged in 2Do with read, watch and check tags.

All lists are sorted by priority. I hope to bring all these lists closer to 0 when I get time. But until then, perhaps you will find something interesting in them.

Here are the lists I share so far.

@isaqueprofeta
isaqueprofeta / siem_training.md
Last active April 19, 2024 17:54
SIEM Training