This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
| (async function generateReplies(document) { | |
| // https://conventionalcomments.org/#labels | |
| const LABEL = { | |
| praise: "praise", | |
| nitpick: "nitpick", | |
| suggestion: "suggestion", | |
| issue: "issue", | |
| todo: "todo", | |
| question: "question", | |
| thought: "thought", |
Based off of: http://docs.sequelizejs.com/en/1.7.0/articles/express/
Create and initialize your a directory for your Express application.
$ mkdir sequelize-demo| sudo apt-get install python-software-properties -y | |
| sudo add-apt-repository ppa:ondrej/php -y | |
| sudo apt-get update -y | |
| sudo apt-get install php7.2 php-pear php7.2-curl php7.2-dev php7.2-gd php7.2-mbstring php7.2-zip php7.2-mysql php7.2-xml | |
| sudo apt-get install libapache2-mod-php7.2 -y | |
| sudo a2dismod php5 | |
| sudo a2enmod php7.2 | |
| sudo service apache2 restart |
Snake is a fun game to make as it doesn't require a lot of code (less than 100 lines with all comments removed). This is a basic implementation of the snake game, but it's missing a few things intentionally and they're left as further exploration for the reader.
| // check version | |
| node -v || node --version | |
| // list locally installed versions of node | |
| nvm ls | |
| // list remove available versions of node | |
| nvm ls-remote | |
| // install specific version of node |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
| module.exports = { | |
| up: function (queryInterface, Sequelize) { | |
| return [ | |
| queryInterface.addColumn('User', 'name', { | |
| type: Sequelize.STRING | |
| }), | |
| queryInterface.addColumn('User', 'nickname', { | |
| type: Sequelize.STRING, | |
| }) | |
| ]; |
| # Default termtype. If the rcfile sets $TERM, that overrides this value. | |
| set -g default-terminal screen-256color | |
| # support logging out and back in | |
| set -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION" | |
| # pbcopy support | |
| set-option -g default-command "reattach-to-user-namespace -l bash" | |
| # vi mode |
Project:
project/: A directory named with the project's name which stores the actual Python package
__init__pyapp.pysettings.pyurls.pymodels/
__init__.pybaes.pyhandlers/