Skip to content

Instantly share code, notes, and snippets.

View johnmilner's full-sized avatar

john milner johnmilner

View GitHub Profile
@GhazanfarMir
GhazanfarMir / Instructions.sh
Last active December 21, 2023 22:55
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa
@thegitfather
thegitfather / vanilla-js-cheatsheet.md
Last active April 17, 2024 18:56
Vanilla JavaScript Quick Reference / Cheatsheet
@needim
needim / mediaqueries.css
Last active April 4, 2024 23:23
Device Specific CSS Media Queries Collection
/*
Based on:
1. http://stephen.io/mediaqueries
2. https://css-tricks.com/snippets/css/media-queries-for-standard-devices/
*/
/* iPhone X in portrait & landscape */
@media only screen
and (min-device-width : 375px)
and (max-device-width : 812px)
@derhuerst
derhuerst / intro.md
Last active May 13, 2023 17:56
Installing the Z Shell (zsh) on Linux, Mac OS X and Windows

Installing zsh – the easy way

The Z shell (zsh) is a Unix shell [...]. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.

Z shell – Wikipedia

Read more about ZSH at An Introduction to the Z Shell.

Choose one of the following options.

@khilnani
khilnani / chromebook-ubuntu.md
Last active July 22, 2018 07:31
Install Ubuntu on Chromebook. In Ubuntu, to install Lamp, Mongo DB: wget -O - http://goo.gl/YMhdcP | sudo bash

Install Ubuntu on Chromebook

  • Restart using ESC-Refresh-Power
  • At the prompt, CTRL-D to erase and install ChromeOS in Developer mode
  • Launch terminal - CTRL-ALT-t
  • Download and Install Crouton from (https://github.com/dnschneid/crouton)
    • sudo sh -e ~/Downloads/crouton -t cli-extra
    • sudo sh -e crouton -p "/media/removable/USB Drive/" -r trusty -t cli-extra
    • sudo sh -e crouton -p "/media/removable/USB Drive/" -r trusty -t xfce
  • Open up port 80 if needed - sudo /sbin/iptables -A INPUT -p tcp --dport 80 -j ACCEPT
@Kartones
Kartones / postgres-cheatsheet.md
Last active April 25, 2024 16:50
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)
@davfre
davfre / git_cheat-sheet.md
Last active February 21, 2024 20:41
git commandline cheat-sheet
@hofmannsven
hofmannsven / README.md
Last active April 19, 2024 13:17
Git CLI Cheatsheet
@zroger
zroger / httpd.conf
Created July 13, 2013 14:58
Minimal httpd.conf for running apache in the foreground for local php development.
#
# Minimal httpd.conf for running apache in the foreground for local php
# development.
#
# Setup:
# 1. Place this file in the root of your project.
# 2. Make sure the ./tmp directory exists (for the pid and lock files).
# 3. Update the DocumentRoot and Directory directives with the relative path to
# your project's document root.
#