Skip to content

Instantly share code, notes, and snippets.

View dan-dm's full-sized avatar
📚
Learning

Dan Dumitrescu dan-dm

📚
Learning
View GitHub Profile
@dan-dm
dan-dm / markdown-details-collapsible.md
Created December 3, 2021 20:29 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section containing markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
@dan-dm
dan-dm / parse-int-query.ts
Created November 16, 2021 12:00 — forked from ezirmusitua/parse-int-query.ts
[Parse integer query params] parse integer query parameters in nestjs #node #nestjs
import {
Controller,
Get,
ParseIntPipe,
Query,
} from '@nestjs/common';
export class GalleryController {
constructor() {
}
@dan-dm
dan-dm / clean_code.md
Created November 12, 2021 19:19 — forked from wojteklu/clean_code.md
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

@dan-dm
dan-dm / terminal-cheat-sheet.txt
Created October 14, 2021 11:20 — forked from cferdinandi/terminal-cheat-sheet.txt
Terminal Cheat Sheet
# Terminal Cheat Sheet
pwd # print working directory
ls # list files in directory
cd # change directory
~ # home directory
.. # up one directory
- # previous working directory
help # get help
-h # get help
@dan-dm
dan-dm / gist:463aae699ae367b2feb0030482561fff
Created May 10, 2021 13:57 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@dan-dm
dan-dm / chmod-400.cmd
Created March 28, 2021 00:22 — forked from jaskiratr/chmod-400.cmd
Set permission of file equivalent to chmod 400 on Windows.
# Source: https://stackoverflow.com/a/43317244
$path = ".\aws-ec2-key.pem"
# Reset to remove explict permissions
icacls.exe $path /reset
# Give current user explicit read-permission
icacls.exe $path /GRANT:R "$($env:USERNAME):(R)"
# Disable inheritance and remove inherited permissions
icacls.exe $path /inheritance:r
@dan-dm
dan-dm / Problema_EULER_1.java
Created March 21, 2020 19:14 — forked from brunoperezm/Problema_EULER_1.java
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000.
/* If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000. */
public class Problema_EULER_1{
public static void main (String[] args) {
int sum_3 = 0,
sum_5 = 0;
for (int x =1; x<=1000; x++) {
@dan-dm
dan-dm / Problema_OMA_3_Intercolegial.java
Created March 21, 2020 19:14 — forked from brunoperezm/Problema_OMA_3_Intercolegial.java
¿Cuántos números formados exclusivamente por los dígitos 3 y 7, y divisibles por 3 y por 7, son menores a 100000?
public class Problema_OMA_3 {
/**
* @param args
*/
public static void main(String[] args) {
/*
a) ¿Cuántos números formados exclusivamente por los dígitos 3 y 7, y divisibles por 3 y por 7, son menores a 100000?
b) ¿Cuántos números formados exclusivamente por los dígitos 3 y 7, y divisibles por 3 y por 7, son menores a 100000000?*/