Skip to content

Instantly share code, notes, and snippets.

@LogosITO
LogosITO / Vec2.hpp
Created May 6, 2024 21:34
C++ Vector2 Implementation.
#pragma once
#include <iostream>
#include <cmath>
#define W_EPS 0.000001
bool isEqual(double x, double y) {
return std::fabs(x - y) < W_EPS;
}
@DmitriiNazimov
DmitriiNazimov / commitConvention.md
Last active May 6, 2024 21:34 — forked from bibendi/gist:7941823
Оформление коммитов #git

Как писать коммиты

Источники

В качестве основы используется Angular Git commit Message Convention - это наиболее авторитетный источник. Все остальные вариации конвенций по коммитам ссылаются на эту.

Также достаточно авторитетным источником является conventionalcommits.org

Ниже находится краткая выжимка того, как я понял эти конвенции.

Шаблон коммита

@bibendi
bibendi / gist:7941823
Created December 13, 2013 09:21
Оформление коммитов

Для оформления сообщения коммита следует использовать следующий шаблон:

<type>(<scope>): <subject>
<BLANK LINE>
<body>

Заголовок

Тип коммита

@LarryIsBetter
LarryIsBetter / Linux Laptop Optimizations.md
Last active May 6, 2024 21:34
Linux Laptop Optimizations

I have a website now that includes a more dumbed down but straight forward version of this guide that isnt basied towards Arch Linux but considers most distros. https://linuxguidance.net/improve-battery-and-optimize-your-linux-laptop/

Everything I do in this guide is mostly taken from the Arch Wiki, and is for Arch Linux, obviously this can probably be applied to other Linux distributions especially Arch based ones, this guide is for people who want a laptop with similar effciency they had on Windows or MacOS. I hate the excuse of having to compromise on Linux to have good battery or thermals on laptops.

Please think of this guide as more of a starting point, if you're serious about fully optimizing your laptop research your laptop and the hardware inside of it as that can get you even further down the rabbit hole.

This guide assumes you have a relatively modern laptop with at least an SSD from the factory, if you don't, don't worry you can still probably follow this guide perfectly, if you have a 32-b

@martinsbruveris
martinsbruveris / tensorflow_model_surgery.ipynb
Created November 15, 2020 22:03
How to split tensorflow models into two at a given layer.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@remorses
remorses / renamer.ts
Last active May 6, 2024 21:32
Babel `BatchRenamer`, 100x faster babel `scope.rename()` when you have many identifier to rename
// original https://github.com/babel/babel/blob/9c77558234c87b9220604fbc1519089e2d6334e2/packages/babel-traverse/src/scope/lib/renamer.ts#L61
import splitExportDeclaration from '@babel/helper-split-export-declaration'
import type { Scope } from '@babel/traverse'
import { visitors } from '@babel/traverse'
import { traverseNode } from '@babel/traverse/lib/traverse-node'
import * as t from '@babel/types'
import { NodePath, Visitor } from '@babel/core'
import type { Identifier } from '@babel/types'
@biggers
biggers / exifImageMover.py
Last active May 6, 2024 21:32
rename JPEG image files by (date, time) from EXIF data -- "fork" / update of n3wtron/exifImageMover.py
#!/usr/bin/env python
from PIL import Image
import sys
import time
import os
from os import path
import shutil
from optparse import OptionParser
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 6, 2024 21:32
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@jonashackt
jonashackt / molecule.yml
Created November 30, 2018 13:50
Molecule: define host_vars or group_vars in provisioner/inventory that are really used by Molecule´s platform
# Roles which require host/groups to have certain variables set
# see (scroll down!) https://molecule.readthedocs.io/en/latest/configuration.html#provisioner & https://github.com/ansible/molecule/issues/1037
# like:
provisioner:
name: ansible
...
inventory:
host_vars:
docker-debian-stretch:
gitlab_domain: "localhost"
@dragonfire1119
dragonfire1119 / how-to-ssh-into-a-proxmox-container.md
Created June 19, 2023 13:32
How to SSH into a Proxmox container

Proxmox

So if you're using Proxmox you need to open up ssh and run the following commands:

  1. Setup a root password
sudo passwd root