Skip to content

Instantly share code, notes, and snippets.

View audrew's full-sized avatar
💭
Open

Audrius audrew

💭
Open
View GitHub Profile
@zeta709
zeta709 / !_cpp_code_completion.md
Last active February 10, 2023 04:54
Setup ccls and coc.vim (Ubuntu 20.04.3 LTS)

⚠️ This guide is a WIP.

You can use either ccls or clangd. You don't need both. See ccls.md or clangd.md for ccls or clangd, respectively.

{
"suggest.noselect": false,
"coc.preferences.formatOnSaveFiletypes": [
"javascript",
"typescript",
"typescriptreact",
"json",
"javascriptreact",
"typescript.tsx",
"graphql"
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active October 24, 2025 01:17
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

PlatformIO with Vim (neomake, clang, coc-vim, ale)

Requirements

PlatformIO

clangd

@vicgonvt
vicgonvt / deployment_guide.md
Last active July 17, 2025 01:37
Deployment Guide for Ubuntu Server from Scratch with Laravel
@resistancecanyon
resistancecanyon / multipleImageContentReader.js
Last active September 5, 2024 08:29
Reading Multiple Image Base64 data using Es6 Async/Await in a html:type:file input
// html
// <input type="file" onchange="imagesSelected" multiple accept=".gif,.jpg,.jpeg,.png" />
async function imagesSelected(event) {
let files = [...event.target.files];
let images = await Promise.all(files.map(f=>{return readAsDataURL(f)}));
//all images' base64encoded data will be available as array in images
}
function readAsDataURL(file) {
@bradtraversy
bradtraversy / node_cheerio_scraping.js
Created August 6, 2018 02:55
Simple example to scrape some posts and put into a CSV file using Node & Cheerio
const request = require('request');
const cheerio = require('cheerio');
const fs = require('fs');
const writeStream = fs.createWriteStream('post.csv');
// Write Headers
writeStream.write(`Title,Link,Date \n`);
request('http://codedemos.com/sampleblog', (error, response, html) => {
if (!error && response.statusCode == 200) {
@bradtraversy
bradtraversy / ssh.md
Last active September 30, 2025 20:16
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh brad@192.168.1.29

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

@j-jith
j-jith / miui-fastboot-howto.rst
Last active October 11, 2025 02:59
How to flash MIUI Fastboot ROM from Linux

How to flash MIUI Fastboot ROM from Linux