Skip to content

Instantly share code, notes, and snippets.

View hanokhaloni's full-sized avatar
🐫
...

Hanokh Aloni hanokhaloni

🐫
...
View GitHub Profile
@Mosharush
Mosharush / .bashrc
Last active October 6, 2023 16:43
Bash Alias to run last wrong command wrote in Hebrew to the correct command :)
alias גררר="replace_hebrew_with_latin"
replace_hebrew_with_latin() {
previous_command=$(history | tail -n 1 | sed 's/^[ ]*[0-9]*[ ]*//')
latin_command=$(echo "$previous_command" | tr 'פםןוטארק׳/ףךלחיעכגדשץתצמנהבסז' 'poiuytrewq;lkjhgfdsa.,mnbvcxz')
# Display the translated command
echo "Translated Command: $latin_command"
# Ask for confirmation before executing
echo "Do you want to execute this command? [Press Enter again]"
@yurynix
yurynix / README.md
Last active July 7, 2022 15:20
Fake cpu count for node

cpu-count.js:

console.log(require('os').cpus().length);

To compile:

gcc -shared -fPIC intercept.c -o intercept.so -ldl
[
{
"title": "Aboleth",
"icon": "imp-laugh",
"contents": [
"subtitle | Large aberration, lawful evil",
"rule",
"property | Armor class | 17 (Natural Armor)",
"property | Hit points | 135 (18d10 + 36)",
"property | Speed | 10 ft., swim 40 ft. ",
#!/usr/bin/env groovy
pipeline {
agent any
tools {nodejs "latest"}
stages {
stage('preflight') {
steps {
echo sh(returnStdout: true, script: 'env')
sh 'node -v'
}
@thornbill
thornbill / .gitlab-ci.yml
Created November 22, 2016 21:29
Example Node GitLab CI Yamlfile
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image: node:6
before_script:
- npm install
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:

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?

@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@vasanthk
vasanthk / System Design.md
Last active June 14, 2024 01:19
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@ebramanti
ebramanti / uncle_bob_scribe_oath.md
Last active December 20, 2022 14:54
Uncle Bob Scribe's Oath

Uncle Bob - Scribe's Oath

  1. I will not produce harmful code.
    • I will not intentionally write code with bugs.
    • This means: Do your best.
  2. I will not produce code that's not my best.
  3. I will provide with each release a quick, testable & repeatable proof that the code works.
  4. I will not avoid release that will impede progress.
    • Short term rapid releases
  5. I will fearlessly and relentlessly improve the quality of code.
  • I will never make the code worse.
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 15, 2024 03:01
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites