Skip to content

Instantly share code, notes, and snippets.

View mapsi's full-sized avatar

Angel Psiakis mapsi

View GitHub Profile
@mapsi
mapsi / kitty.conf
Created September 17, 2024 14:27
kitty config
# vim:fileencoding=utf-8:foldmethod=marker
#: Fonts {{{
#: kitty has very powerful font management. You can configure
#: individual font faces and even specify special fonts for particular
#: characters.
# font_family monospace
# bold_font auto
@mapsi
mapsi / setup_lazyvim.sh
Last active August 11, 2024 08:57
setup lazyvim
brew install kitty nvim git lazygit ripgrep fd
# required
mv ~/.config/nvim{,.bak}
# optional but recommended
mv ~/.local/share/nvim{,.bak}
mv ~/.local/state/nvim{,.bak}
mv ~/.cache/nvim{,.bak}
@mapsi
mapsi / slack_etiquette.md
Created June 10, 2024 09:45
Slack Etiquette
  1. Clear Channel Naming Conventions:
    • Project Channels: Use a consistent format like project-<name> for channels related to specific projects. For example, project-acme-website.
    • Functional Channels: Prefix functional channels with their purpose, such as design-, devops-, or marketing-.
    • General Channels: Create general channels like general, announcements, and random for broader discussions.
    • Location-Specific Channels: If your team is distributed, consider channels like london-team, nyc-team, etc.
    • Avoid Abbreviations: Use clear and descriptive names to avoid confusion.
  2. Review Channels Regularly: Periodically review your channels to ensure they remain relevant and organised. Consider archiving channels that are no longer active or necessary.
  3. Use Notion for Permanent Information: While Slack is great for real-time communication, consider Notion as the primary repository for permanent information. Use Notion for documen
@mapsi
mapsi / offboarding.md
Last active June 10, 2024 09:43
Offboarding

When offboarding an employee, prioritize the revocation of access to ensure data security. Follow these steps in order of severity:

@mapsi
mapsi / go-project-layout.md
Created April 19, 2023 09:35 — forked from candlerb/go-project-layout.md
Suggestions for go project layout

If someone asked me the question "what layout should I use for my Go code repository?", I'd start by asking back "what are you building: an executable, or a library?"

Single executable

Stage 1: single source file

Create a directory named however you want your final executable to be called (e.g. "mycommand"), change into that directory, and create the following files:

@mapsi
mapsi / mapToObj.js
Created August 9, 2022 02:43
Recursive map to object
const mapToObj = (m) =>
Array.from(m).reduce(
(obj, [key, value]) => ({
...obj,
[key]: value instanceof Map ? mapToObj(value) : value,
}),
{},
);
export default { mapToObj };
@mapsi
mapsi / multisigWallet.sol
Created May 18, 2022 17:08
Multi Signature Wallet in Solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
contract Wallet {
address[] public owners;
uint limit;
uint balance;
uint public totTransfers;
@mapsi
mapsi / serverless-bundle.sh
Created June 30, 2021 10:33
Lazy man's installation of serverless-bundle
npm i -D serverless-bundle
npm r eslint webpack ts-loader typescript css-loader graphql-tag @babel/core babel-eslint babel-loader eslint-loader @babel/runtime @babel/preset-env serverless-webpack source-map-support webpack-node-externals eslint-config-strongloop tsconfig-paths-webpack-plugin fork-ts-checker-webpack-plugin @babel/plugin-transform-runtime babel-plugin-source-map-support
@mapsi
mapsi / buddyworks.json
Created June 9, 2021 20:23
Buddy works permissions for Elastic Beanstalk
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"elasticloadbalancing:RegisterTargets",
"elasticloadbalancing:DescribeTargetGroups",
"logs:CreateLogGroup",
@mapsi
mapsi / gist:05f8a70b057a2963f296be4a1c8935e4
Created April 24, 2021 08:04
Artificial load for testing monitoring tools
dd if=/dev/urandom | gzip -9 >> /dev/null &