Skip to content

Instantly share code, notes, and snippets.

View andryjohn's full-sized avatar
🔬
Eating Ice cream

Rajohnson Andry andryjohn

🔬
Eating Ice cream
View GitHub Profile
@andryjohn
andryjohn / zsh.md
Created February 14, 2020 18:01 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu
@andryjohn
andryjohn / nvidia.md
Created February 13, 2020 19:25 — forked from bitsurgeon/nvidia.md
install Nvidia driver on Ubuntu with Secure Boot

Install Nvidia Driver on Ubuntu 18.04.3

Secure Boot

This section applies to machines with Secure Boot, such as ThinkPad.

  1. Before installation, switch to "Discrete Graphics" in BIOS, if both Intel and Nvidia graphics are present.
  2. During installation, make sure to select the "Install third-party software for graphics and Wi-Fi hardware and addition media formats" in "Updates and other software" screen.
  3. Select "Configure Secure Boot", and set password.
  4. Continue Ubuntu installation as normal.
@andryjohn
andryjohn / masOS.md
Last active February 12, 2020 07:53
Setup instructions

The following instructions will help you to get ready for your workflow:

  • Grab a text editor, where you'll spend your day and nights
  • Install a package manager
  • Pimp your Terminal
  • Setup git and GitHub

Command Line Tools

@andryjohn
andryjohn / Install NVIDIA Driver and CUDA.md
Created January 31, 2020 11:57 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@andryjohn
andryjohn / intro.md
Created December 25, 2019 17:07 — forked from derhuerst/intro.md
Installing Git on Linux, Mac OS X and Windows
@andryjohn
andryjohn / Activate Office 2019 for macOS VoL.md
Created October 28, 2019 16:47 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

@andryjohn
andryjohn / css-selectors.md
Created July 9, 2019 22:07 — forked from magicznyleszek/css-selectors.md
CSS Selectors Cheatsheet

CSS Selectors Cheatsheet

Element selectors

Element -- selects all h2 elements on the page

h2 {
    foo: bar;
@andryjohn
andryjohn / vim-cheat-sheet.md
Created June 21, 2019 21:12 — forked from ummahusla/vim-cheat-sheet.md
Vim Cheat Sheet

Modes

Vim has two modes insertion mode and command mode. The editor begins in command mode, where the cursor movement and text deletion and pasting occur. Insertion mode begins upon entering an insertion or change command. [ESC] returns the editor to command mode (where you can quit, for example by typing :q!). Most commands execute as soon as you type them except for "colon" commands which execute when you press the ruturn key.

Quitting

  • :x Exit, saving changes
  • :q Exit as long as there have been no changes
  • ZZ Exit and save changes if any have been made
  • :q! Exit and ignore any changes

Inserting Text

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL

@andryjohn
andryjohn / postgres-cheatsheet.md
Created June 12, 2019 10:52 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)