Skip to content

Instantly share code, notes, and snippets.

View mapineda's full-sized avatar
📐

Marco Pineda mapineda

📐
View GitHub Profile
@mapineda
mapineda / postgres-cheatsheet.md
Created August 20, 2021 20:55 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@mapineda
mapineda / VimTutorSummary.md
Last active April 13, 2022 01:25
Vimtutor Summary

Lesson 1 SUMMARY

  1. The cursor is moved using either the arrow keys or the hjkl keys. h (left) j (down) k (up) l (right)

  2. To start Vim from the shell prompt type: vim FILENAME

  3. To exit Vim type: :q! to trash all changes. OR type: :wq to save the changes.

#!/bin/sh
# _ _ _ _
# ___ _____ __ (_)_ __ ___| |_ __ _| | |
# / _ \/ __\ \/ / | | '_ \/ __| __/ _` | | |
#| (_) \__ \> < | | | | \__ \ || (_| | | |
# \___/|___/_/\_\ |_|_| |_|___/\__\__,_|_|_|
echo "I ❤️ 🍎"
@mapineda
mapineda / GraphQL101.md
Created July 13, 2017 03:13
GraphQL101

What is it?

  • new API standard invented and open-sourced by Facebook

  • enables declaratative data fetching

  • GraphQL server exposes single endpoint and respond to queries

Fizz Buzz C Sharp

Print numbers from 1-100. Numbers that are multiple of 3, print fizz. Numbers that are multiple of 5, print buzz. Numbers that are multiples of both, print fizzbuzz

Step 1 : Psuedocode

@mapineda
mapineda / Top-20-C-Sharp-Programming-Interview-Questions.md
Created June 12, 2017 04:45
Top 20 C# Programming Interview Questions

Top 20 C# Programming Interview Questions

Given an unsorted array which has a number in the majority (a number appears more than 50% in the array), find that number?(Solution) http://www.csharpstar.com/csharp-program-to-find-majority-element-in-an-unsorted-array/

How to detect a cycle in singly linked list? (Solution) http://www.csharpstar.com/csharp-program-to-detect-a-cycle-in-a-linkedlist/

How to merge two sorted linked list, write a program in your favorite programming language e.g. Java,C# (Solution)

@mapineda
mapineda / Top-10-c-sharp-interview-questions-strings.md
Created June 12, 2017 04:18
Top 10 C# Interview Questions on Strings

Top 10 C# Interview Questions

  1. How to Print duplicate characters in a String?
  2. How to check if two Strings are anagrams of each other?
  3. How to reverse String in C# using Iteration and Recursion?
  4. How to count number of words in a String?
  5. How to check if String is Palindrome?
  6. How to remove duplicate characters from String?
  7. How to return highest occurred character in a String?
  8. How to determine if the string has all unique characters
@mapineda
mapineda / marco_pineda_resume.md
Last active April 3, 2017 20:01
Marco Pineda Resume
Verifying that +marcoapineda is my blockchain ID. https://onename.com/marcoapineda