Skip to content

Instantly share code, notes, and snippets.

@tabrez
tabrez / .aliases
Last active October 28, 2022 10:28
alias gst='git status'
alias gco='git checkout'
alias ga='git add'
alias gd='git diff'
alias gc='git commit'
alias gp='git push'
alias gl='git pull'
alias gs='git stash'
# make these commands work predictably in all environments
# https://www.ivankrizsan.se/2021/05/16/ansible-and-multipass-virtual-machines/
all:
hosts:
multipassvm1:
ansible_connection: ssh
ansible_user: ubuntu
ansible_host: <ip of multipass vm>
ansible_ssh_common_args: "-o StrictHostKeyChecking=no -o ControlMaster=no -o ControlPath=none"
ansible_private_key: /var/snap/multipass/common/data/multipassd/ssh-keys/id_rsa
# or copy your public ssh key to vm and use:
@tabrez
tabrez / install_ansible.sh
Created April 18, 2022 15:59
Install Ansible on Ubuntu from PPA
export DEBIAN_FRONTEND=noninteractive
apt-get update -y
apt-get install -y acl sudo software-properties-common python-is-python3
apt-add-repository -y ppa:ansible/ansible
apt-get install -y ansible
@tabrez
tabrez / zshrc
Last active April 12, 2022 17:04
Minimal zsh configuration
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
export TERM="xterm-256color"
fpath+=~/.zsh/pure
autoload -U promptinit; promptinit
autoload -U compinit; compinit
prompt pure
@tabrez
tabrez / gitconfig
Created April 8, 2022 07:07
Minimal git configuration
[user]
name = "Tabrez Iqbal"
email = "tabrez@mailbox.org"
[color]
ui = true
[color "branch"]
current = green bold
local = yellow bold
remote = green bold
@tabrez
tabrez / rush-eslint.md
Created January 29, 2022 16:35
Microsoft Rush + ESLint + VS Code Setup

Microsoft Rush + ESLint + VS Code Setup

Use the following code in .eslintrc.js in node/backend projects:

// This is a workaround for https://github.com/eslint/eslint/issues/3458
require('@rushstack/eslint-config/patch/modern-module-resolution')

module.exports = {
  extends: [
@tabrez
tabrez / basic_statistics.ipynb
Last active July 30, 2020 17:45
basic_statistics.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Basic configuration

sudo apt-get install gnome-tweak-tool

Displays -> Scaling 200%
OR Tweaks -> Fonts -> Scaling 2.0

Tweaks -> Top bar -> Clock -> Date
Date & Time -> AM/PM & Auto timezone

const { GraphQLServer } = require('graphql-yoga');
const server = new GraphQLServer({ typeDefs, resolvers });
server.start(() => console.log('Server is running...'));
// run integration tests
// how to stop the server?