Skip to content

Instantly share code, notes, and snippets.

View marco-souza's full-sized avatar
🦕

Marco Antônio marco-souza

🦕
View GitHub Profile
@marco-souza
marco-souza / copyToClipboard.js
Created September 10, 2019 21:49
Function to copy text to clipboard in JS Vanilla
const copyToClipboard = (text, successCallback, errorCallback) => {
const textArea = document.createElement('textarea')
textArea.value = text
document.body.appendChild(textArea)
textArea.select()
try {
// Now that we've selected the anchor text, execute the copy command
document.execCommand('copy')
? successCallback()
@Starttoaster
Starttoaster / 1. docker-compose.yml
Last active April 30, 2023 14:24
Setting up Nextcloud behind Traefik in Docker
version: "2"
services:
# Reverse Proxy and Let's Encrypt
traefik:
container_name: traefik
image: traefik:alpine
restart: always
networks:
- srv
@marco-souza
marco-souza / cloudSettings
Last active October 22, 2019 13:53
Linux - Visual Studio Code - Settings Sync Gist
{"lastUpload":"2019-10-22T13:51:34.552Z","extensionVersion":"v3.4.3"}
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 2, 2024 16:19
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@c9s
c9s / .babelrc
Last active October 21, 2023 14:04
webpack + babel + typescript + es6 - total solutions!
{
"presets": ["es2015"],
"plugins": ["transform-runtime"]
}
@rxaviers
rxaviers / gist:7360908
Last active May 4, 2024 22:00
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:
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a