Skip to content

Instantly share code, notes, and snippets.

View vaporwavie's full-sized avatar

Luiz Nickel vaporwavie

View GitHub Profile
@vaporwavie
vaporwavie / ready.js
Last active May 6, 2020 14:12
Document is literally ready
const DOMisReady = (handler: () => void) => {
if (document.readyState !== "loading") {
handler();
} else {
document.addEventListener("DOMContentLoaded", handler);
}
}
// Usage
@vaporwavie
vaporwavie / undiacritic.ts
Created November 26, 2019 11:30
A diacritic is a glyph added to a letter or basic glyph. This function undoes it.
export default (sentence: string) => {
let dict = [
{
base: 'A',
letters: /[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g,
},
{ base: 'AA', letters: /[\uA732]/g },
{ base: 'AE', letters: /[\u00C6\u01FC\u01E2]/g },
{ base: 'AO', letters: /[\uA734]/g },
{ base: 'AU', letters: /[\uA736]/g },
@vaporwavie
vaporwavie / keybase.md
Created November 8, 2019 11:53
my keybase proof of existence =)

Keybase proof

I hereby claim:

  • I am vaporwavie on github.
  • I am vaporwavie (https://keybase.io/vaporwavie) on keybase.
  • I have a public key ASBD_qmfzUeVBnZNuL3mtAMGrZkArUhSopRBviVkDpcfjAo

To claim this, I am signing this object:

@vaporwavie
vaporwavie / hello_world.py
Created October 15, 2019 11:33
Hello World Examples
class HelloWorld:
def __init__(self, name):
self.name = name.capitalize()
def sayHi(self):
print "Hello " + self.name + "!"
hello = HelloWorld("world")
hello.sayHi()
@vaporwavie
vaporwavie / postman-install.sh
Created July 25, 2019 23:57
Installing POSTman without any suffer =)
#!/bin/bash
wget https://dl.pstmn.io/download/latest/linux64 -O postman-linux-x64.tar.gz
sudo tar xvzf postman-linux-x64.tar.gz -C /opt
sudo ln -s /opt/Postman/Postman /usr/bin/postman
cat << EOF > ~/.local/share/applications/postman2.desktop
[Desktop Entry]
Name=Postman
GenericName=API Client
@vaporwavie
vaporwavie / .hyper.js
Created May 7, 2019 12:44
hyper js file
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@vaporwavie
vaporwavie / vscode.txt
Last active April 14, 2019 03:12
VSCode extensions that I use daily.
emmanuelbeziat.vscode-great-icons-2.1.46
fireyy.vscode-language-todo-1.2.3
ms-vscode.atom-keybindings-3.0.5
ms-vsliveshare.vsliveshare-0.3.1136
philsinatra.popping-and-locking-vscode-black-1.1.6
shardulm94.trailing-spaces-0.2.11
vincaslt.highlight-matching-tag-0.8.6
wix.vscode-import-cost-2.12.0
bierner.emojisense
eamodio.gitlens
# run in "root" folder (e.g /home/datmusic/api.datmusic.xyz/)
chown -R datmusic:www-data storage .env
find storage -type f -exec chmod 664 {} \;
find storage -type d -exec chmod 775 {} \;
chgrp -R www-data storage .env
chmod -R ug+rwx storage .env
@vaporwavie
vaporwavie / android.md
Last active October 14, 2019 13:49
android

Instalando Java JDK(Oracle)

sudo apt-get install python-software-properties

sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

Oracle JDK 8 (recomendado) sudo apt-get install oracle-java8-installer

@vaporwavie
vaporwavie / fixcolor.md
Created February 11, 2018 04:00
Vim Bootstrap requires some additional package in order to work properly. Here is the fix