Skip to content

Instantly share code, notes, and snippets.


Berg Paulo bergpb

View GitHub Profile
nadavrot /
Last active May 5, 2021
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).


Matrix multiplication is a mathematical operation that defines the product of

dweldon /
Last active Feb 10, 2021
Install docker CE on Linux Mint 18.3
#!/usr/bin/env bash
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] xenial stable"
sudo apt-get update
sudo apt-get install docker-ce

##Fixing npm permissions

You may receive an EACCES error when you try to install a package globally. This indicates that you do not have permission to write to the directories that npm uses to store global packages and commands.

You can fix this problem using one of three options:

Change the permission to npm's default directory. Change npm's default directory to another directory. Install Node with a package manager that takes care of this for you. You should back-up your computer before moving forward.

nicobytes /
Last active Aug 3, 2020
Deploy gh-pages ionic pwa
git branch -D gh-pages
git push origin --delete gh-pages
git checkout -b gh-pages
ionic build --prod
find . -type d ! -path './www*' ! -path './.git*' ! -path '.' | xargs rm -rf
rm -r *.*
mv www/* .
rm -rf www
git add .
callmeloureiro / comoSerChatoNoWhatsapp.js
Last active Nov 6, 2020
Como fazer alguém te responder no whatsapp
View comoSerChatoNoWhatsapp.js
Hoje iremos MUDAR a vida da pessoa que não te responde no whatsappp...
Que tal enviar mensagens pra ela até obter uma resposta?!
Sensacional não acha?! Mas, somos devs, correto?! Então vamos automatizar esse paranauê!
Para utilizar:
- Abra o;
- Selecione a conversa que você quer;
- Abra o console e cole o código que está no gist;
nickbclifford /
Last active Apr 16, 2021
How to automatically deploy code to a server using Travis CI

Auto-Deploying via Travis CI

Because Travis CI can automatically execute scripts after successfully (or unsuccessfully!) executing tests, it is an obvious choice for a deployment tool. In order to deploy to a Git repository on a remote server, the process generally is as follows:

  • Set up SSH keys
  • Add the server's copy of the repository as a Git remote
  • Push to the remote
  • SSH into the server and execute any installation/compilation/miscellaneous commands

Before even touching .travis.yml...


cdesch /
Last active May 4, 2021
Rails Generator CheatSheet

Cheat Sheets are greate but they are not a substitute for learning the framework and reading the documentation as we most certainly have not covered every potential example here. Please refer to the Rails Command Line Docs for more information.

Command Line Generator Info


You can get all of this information on the command line.

rails generate with no generator name will output a list of all available generators and some information about global options. rails generate GENERATOR --help will list the options that can be passed to the specified generator.

Levantado /
Last active Sep 9, 2019
Flask WTF custom validator
from wtforms.validators import ValidationError
class UniqChecker:
def __init__(self, model, fieldname, message=None):
if message:
self.message = message
self.message = "You shall no pass"
self.model = model

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional