Skip to content

Instantly share code, notes, and snippets.

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

Wellington Torrejais da Silva wellington1993

🏠
Working from home
View GitHub Profile
@ocodista
ocodista / no-else-please-2.js
Last active February 11, 2024 22:31
no-else-please-2.js
// Uses Node, AMD or browser globals to create a module. This example creates
// a global even when AMD is used. This is useful if you have some scripts
// that are loaded by an AMD loader, but they still want access to globals.
// If you do not need to export a global for the AMD case,
// see returnExports.js.
// If you want something that will work in other stricter CommonJS environments,
// or if you need to create a circular dependency, see commonJsStrictGlobal.js
// Defines a module "returnExportsGlobal" that depends another module called
@ocodista
ocodista / test.js
Created December 14, 2023 16:26
No else please
// Uses Node, AMD or browser globals to create a module. This example creates
// a global even when AMD is used. This is useful if you have some scripts
// that are loaded by an AMD loader, but they still want access to globals.
// If you do not need to export a global for the AMD case,
// see returnExports.js.
// If you want something that will work in other stricter CommonJS environments,
// or if you need to create a circular dependency, see commonJsStrictGlobal.js
// Defines a module "returnExportsGlobal" that depends another module called
@primaryobjects
primaryobjects / app.js
Last active March 13, 2023 21:24
A chatbot that speaks, created by pair-programming with ChatGPT.
const readline = require('readline');
const say = require('say');
const responses = [
{ keyword: 'hello', message: 'Hi there, how can I help you?' },
{ keyword: 'hi', message: 'Hey, what\'s up?' },
{ keyword: 'hey', message: 'Hi! How are you doing today?' },
{ keyword: 'good morning', message: 'Good morning! How can I assist you today?' },
{ keyword: 'good afternoon', message: 'Good afternoon! What brings you here?' },
{ keyword: 'good evening', message: 'Good evening! Is there anything I can help you with?' },
@nichham2
nichham2 / Sources.list--
Last active March 5, 2024 18:17
This is a copy of the sources.list file for ubuntu-22.04-lts Server arm64 Also sources.list-ubuntu-22.04-lts Server amd64
## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
## or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
@hakerdefo
hakerdefo / sources.list
Last active May 1, 2024 06:31
Ubuntu 22.04 LTS (Jammy Jellyfish) complete sources.list
deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
@wellington1993
wellington1993 / Adjust screen bightness in LXDE
Created April 11, 2022 20:43 — forked from tkdchen/Adjust screen bightness in LXDE
Add this piece of configuration into ~/.config/openbox/lxde-rc.xml. Then, Fn+Home and Fn+End can increase and decrease screen's brightness individually. After saving, issue command ``$ openbox --reconfigure`` to load new configuration.
<keybind key="XF86MonBrightnessUp">
<action name="Execute">
<command>xbacklight -inc 10%</command>
</action>
</keybind>
<keybind key="XF86MonBrightnessDown">
<action name="Execute">
<command>xbacklight -dec 10%</command>
</action>
</keybind>
@ishad0w
ishad0w / sources.list
Created December 10, 2021 16:36
Ubuntu 22.04 LTS (ARM/RISC-V) (Jammy Jellyfish) -- Full sources.list
deb http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted universe multiverse
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 11, 2024 17:59
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@wellington1993
wellington1993 / mysql_backup.sh
Created July 29, 2021 18:57 — forked from tleish/mysql_backup.sh
Bash Script to backup all MySQL databases
#!/bin/bash
#==============================================================================
#TITLE: mysql_backup.sh
#DESCRIPTION: script for automating the daily mysql backups on development computer
#AUTHOR: tleish
#DATE: 2013-12-20
#VERSION: 0.4
#USAGE: ./mysql_backup.sh
#CRON:
# example cron for daily db backup @ 9:15 am