Skip to content

Instantly share code, notes, and snippets.

View Coyas's full-sized avatar
🏠
Working from home

Ailton Duarte Coyas

🏠
Working from home
View GitHub Profile
@Coyas
Coyas / README
Created January 31, 2015 17:06
helo
Hi I am a programmer
@Coyas
Coyas / VSCode-extensions
Created June 17, 2019 12:45 — forked from deepu105/VSCode-extensions
VSCode plugins I use
code --install-extension QassimFarid.ejs-language-support
code --install-extension SirTori.indenticator
code --install-extension TimonVS.ReactSnippetsStandard
code --install-extension TwentyChung.jsx
code --install-extension abusaidm.html-snippets
code --install-extension asvetliakov.move-imports
code --install-extension aws-scripting-guy.cform
code --install-extension bierner.markdown-preview-github-styles
code --install-extension ccitiriga.TSMethodCreator
code --install-extension christian-kohler.npm-intellisense
@Coyas
Coyas / Adapter
Created May 9, 2023 16:36
adapter pseudo code
// Say you have two classes with compatible interfaces:
// RoundHole and RoundPeg.
class RoundHole is
constructor RoundHole(radius) { ... }
method getRadius() is
// Return the radius of the hole.
method fits(peg: RoundPeg) is
return this.getRadius() >= peg.getRadius()
class Target:
"""
The Target defines the domain-specific interface used by the client code.
"""
def request(self) -> str:
return "Target: The default target's behavior."
class Adaptee:
class Target:
"""
The Target defines the domain-specific interface used by the client code.
"""
def request(self) -> str:
return "Target: The default target's behavior."
class Adaptee:
#!/bin/bash
# Check if required arguments are provided
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <remote_user> <remote_host>"
exit 1
fi
# Assign command line arguments to variables
REMOTE_USER="$1"