Skip to content

Instantly share code, notes, and snippets.

@wojteklu
wojteklu / clean_code.md
Last active May 4, 2024 15:37
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

@jocelyndrw
jocelyndrw / whoop_intervals.py
Last active May 4, 2024 15:35
Whoop recovery/sleep data sync to intervals.icu
# Copyright (c) 2023 Jocelyn De La Rosa
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
Aya (Chakir 🇲🇦)|Anass (Ben Bouazza ⵣ 🇫🇷)|Omar (B. Villa 🇪🇸; Pro White Hat)|Jeremie (David)|Megan (McClarty 🇨🇦)|Marc (Capelo)|Anass (No Hole; Afilal)|Izzy (Englander 🇮🇱)|Igor (Tulchinsky 🇧🇾)|Jeremie (Pierard de Maujouy)|Christian (Hamelain 🇯🇵)|Emile (Huguet)|Lorraine (Chenyi Zhang)|Anas (Mohammed Charafi)|Meriem (Janati Idrissi)|Louis (Xavier Haensler)|Ayoub (Zaroil)|Sylvain (Potuaud)|Mohamed (Amine Bouchemama)|Reda (Bousseta)|Simo (Haboucha)|Salahedinne (Mezzane)|Andrew (Song)|Michel (Boutemy)|Armelle (Rambaud)|Chaquiq El Badr (Science Maths B)|Jenny (Mak)|Eric (Boyer)|Ray (Marie-Liesse)|Frederic (Pascal)|Jerome (Juillard)|Martin (Haugh)|Emanuel (Derman)|Ali (Hirsa)|Christina (Chen 🇨🇳)|Andrej (Simeski 🇲🇰)|Geoffrey (Lauprette 🇺🇸)|Gappy (Gappy 🇮🇹)|Mayur (Agrawal 🇮🇳)|Geoff. (Zweig 🐻☀️)|Atul (Kumar)|Naval (Chopra)|Dmitry (Malioutov 🇷🇺)|Hyun (Chul 🇰🇷)|Hesky (Fisher)|Alex. (Aduenko)|Murat (Karakus 🇹🇷)|Asaf (Harel)|Kevin (Marchand)|Omar (Housni)|Othman (El Balghiti)|Yoram (Singer)|Raphael (Gad)|Gad (El Maleh)|Ori (G

Requirements

There are 18 questions in total. You will need five RHEL 8 (or CentOS 😎 virtual machines to be able to successfully complete all questions.

Optional Automatic Exam Setup Available

Here is an automated exam environment deployment for Mac/Linux/Windows that deploys the practice exam environment for you, including IPA server/client installation and configuration. You can also use your own lab environment. Navigate to the respective repo you wish to use for this practice exam and follow the README instructions:

https://github.com/rdbreak/rhce8env, https://github.com/rdbreak/ansible27env, https://github.com/rdbreak/ansible8env.

@mahendra0859
mahendra0859 / design-resources-for-developers.md
Created May 11, 2020 02:57
Design Resources For Developers

Design Resources For Developers

A curated list of FREE design & UI resources for developers including stock photos, templates, frameworks, UI Kits, online tools and much much more.

Please read contributing guidelines before submitting new resources.

Table of Contents

@BankSecurity
BankSecurity / Simple_Rev_Shell.cs
Last active May 4, 2024 15:30
C# Simple Reverse Shell Code
using System;
using System.Text;
using System.IO;
using System.Diagnostics;
using System.ComponentModel;
using System.Linq;
using System.Net;
using System.Net.Sockets;
@GitPaulo
GitPaulo / scrapglobalddranks.js
Created May 4, 2024 15:26
Scrapes the global ffxiv rankings based on the website xiv.johnrivs.com/deepdungeon
// Use in console: https://xiv.johnrivs.com/deepdungeon
const scrapeDataFromPage = (pageNumber) => {
return new Promise((resolve, reject) => {
fetch(`https://xiv.johnrivs.com/deepdungeon?page=${pageNumber}`)
.then(response => response.text())
.then(html => {
const parser = new DOMParser();
const doc = parser.parseFromString(html, 'text/html');
const baseXPath = '/html/body/div/div[6]/div/div[';
@mertyildiran
mertyildiran / alphademo-png.c
Created July 2, 2017 14:29
Transparent window with GTK and display a PNG image
#include <gtk/gtk.h>
#include <gdk/gdkscreen.h>
#include <cairo.h>
/*
* This program shows you how to create semi-transparent windows,
* without any of the historical screenshot hacks. It requires
* a modern system, with a compositing manager. I use xcompmgr
* and the nvidia drivers with RenderAccel, and it works well.
*
@jpluimers
jpluimers / get.guest.log
Created May 15, 2021 15:05
ESXi output of `vim-cmd vmsvc/get.guest 14` for an OpenSuSE Linux virtual machine
Guest information:
(vim.vm.GuestInfo) {
toolsStatus = "toolsOk",
toolsVersionStatus = "guestToolsUnmanaged",
toolsVersionStatus2 = "guestToolsUnmanaged",
toolsRunningStatus = "guestToolsRunning",
toolsVersion = "10304",
toolsInstallType = "guestToolsTypeOpenVMTools",
toolsUpdateStatus = (vim.vm.GuestInfo.ToolsUpdateStatus) null,