Cheatsheets

337 quick reference guides

Category

CLI35

Cron

Operator Description all values

CLI2024-03-17

Homebrew

Command Description brew install git Install a package

CLI

httpie

$ http POST http://example.com name="John" Host:example.com — JSON, cookies, files, auth, and other httpie examples.

CLI2020-07-05

adb (Android Debug Bridge)

Command Description adb devices Lists connected devices

CLI2018-03-06

composer

Basic guide on how to use Composer, the PHP Package manager.

CLI2020-02-23

Fish shell

Shortcut Description ^A ←/^E → Move to the line beginning/end

CLI2018-01-31

Rsync

CLI

Watchexec

[mattgreen/watchexec](https://github.com/mattgreen/watchexec) runs commands whenever certain files change.

CLI2017-10-18
watchexec --excts js,jsx -- npm testwatchexec --help

Animated GIFs

You'll need mplayer, imagemagick and gifsicle. This converts frames to .png, then turns them into an animated gif. See ss and endpos.

CLI

Ansi codes

Quick reference to ANSI color codes.

CLI

Bash scripting

Featured

This is a quick reference to getting started with Bash scripting. Learn bash in y minutes (learnxinyminutes.com)

CLI2020-07-05
VariablesFunctionsInterpolation+4

Command Line Interface Pages

Render Page's repository

CLI2023-02-23
CLI

Curl

CLI2020-03-09

Emacs

^n ^p up/down ^f ^b left/right

CLI

ffmpeg

CLI

Find

These conditions only work in MacOS and BSDlike systems (no GNU/Linux support).

CLI2019-11-17

GNU grep

In BRE, these characters have a special meaning unless they are escaped with a backslash: ^ $ . [ ] \

CLI2021-08-23

GnuPG

[GnuPG](https://gnupg.org/) is a complete and free implementation of the OpenPGP standard.

CLI2017-10-22

Makefile

= expressions are only evaluated when they're being used. Prefix Description

CLI

Man

1 General User Commands 2 System Calls

CLI

ncftp

CLI

Pass

Reference <https://passwordstore.org

CLI

pm2

Command Description pm2 start app.js name myapi Start and name a process

CLI2020-05-08

rename

See: <http://plasmasturm.org/code/rename/ Rename hello.txt to world.txt and so on in .txt.

CLI

rTorrent

[rTorrent](https://rakshasa.github.io/rtorrent/) is a command-line torrent application. Here are some shortcut keys.

CLI

scp

CLI2018-12-25

Screen

Screen or GNU Screen is a terminal multiplexer. In other words, it means that you can start a screen session and then open any number of windows (virtual terminals). This does not contain **all** of screen's commands and options, read [GNU's manual](https://www.gnu.org/software/screen/manual/screen.html#Commands) to see everything

CLI2024-02-03
ScreenLinuxUnix+3

sed

Here's some hints on using sed.

CLI

Shell scripting

CLI

Shell: named pipes

This creates a virtual file with the contents of the output of ls ./old. Named pipe (wikipedia.org)

CLI

tar

Concatenate, Deflate, Inflate files

CLI2022-08-11

tmux

$ tmux u UTF8 mode

CLI2024-04-08

top

See the processes in your Unix machine.

CLI2020-01-01

YUM

CLI2024-02-07

zsh

Expression Example Description !! sudo !! Last command (sudo !!)

CLI

JavaScript15

ES2015+

Featured

A quick overview of new JavaScript features in ES2015, ES2016, ES2017, ES2018 and beyond.

JavaScript2019-11-14

Vue.js

[Vue.js](https://vuejs.org/) is an open-source Model–view–viewmodel JavaScript framework for building user interfaces and single-page applications.

JavaScript2019-12-26

fetch()

Non2xx responses are still successful requests. Use another function to turn them to errors. See: isomorphicfetch (npmjs.com)

JavaScript

JavaScript Date

new Date( 2014, 2, 1, 13, 0, 59, 0) Date Year Month Day Hour Min Sec Milli

JavaScript

JavaScript speech synthesis

See: SpeechSynthesisUtterance (developer.mozilla.org)

JavaScript

Jsdoc

See: <https://jsdoc.app/index.html Type Description

JavaScript2024-07-26

npm

Command Description npm i Alias for npm install

JavaScript2019-12-24

Web workers

Messages can be anything that can be serialized into JSON (objects, arrays, strings, numbers, booleans). See: structured clone These are the contents of message on onmessage.

JavaScript2017-10-30

applicationCache

This is a deprecated HTML feature. See: Using the application cache (developer.mozilla.org)

JavaScript

Canvas

Saves: strokeStyle fillStyle globalAlpha lineWidth lineCap lineJoin miterLimit shadowOffsetX shadowOffsetY shadowBlur shadowColor globalCompositeOperation, Transformations (translate rotate scale tran

JavaScript

DOM Range

Quick reference to the HTML [DOM createRange API](https://devdocs.io/dom/range).

JavaScript

DOM Selection

Quick introduction to the HTML [DOM selection API](https://devdocs.io/dom/selection).

JavaScript

JavaScript Arrays

JavaScript

JavaScript lazy shortcuts

What Lazy mode "The right way" String to number +str parseInt(str, 10) or parseFloat()

JavaScript

Promises

intro: A quick reference to the JavaScript Promise API. Using Promises guide (developer.mozilla.org)

JavaScript

JavaScript libraries72

Chai.js

expect(x).to.be.equal(y) 〉 assert.equal(x, y) 〉 .to.be.true 〉 jQuery, assertions, TDD and BDD, and other Chai examples.

JavaScript libraries2018-06-25

Flow

Most of what you need to do is to simply add annotations to function arguments! See: flow.org docs

JavaScript libraries2020-07-05

Jest

A quick overview to [Jest](https://facebook.github.io/jest/), a test framework for Node.js. This guide targets Jest v20.

JavaScript libraries2020-06-17

Lodash

This is not a complete list.

JavaScript libraries2020-06-24

Pug

See: Attributes See: Comments

JavaScript libraries2017-10-30

Yarn

npm yarn npm init yarn init

JavaScript libraries2019-09-30

bluebird.js

Also see the promise cheatsheet and Bluebird.js API (github.com). Those marked with are nonstandard Promise API that only work with Bluebird promises.

JavaScript libraries2017-09-08

Camp

[Camp](https://github.com/espadrine/sc/) is a Node.js web server framework. This guide targets Camp v17.x.

JavaScript libraries2017-09-21

co

[co](https://github.com/tj/co) allows you to use generators to manage async flow.

JavaScript libraries2017-10-27

expect.js

Expect is a library for assertions in tests. See: mjackson/expect

JavaScript libraries2017-09-02

Gremlins.js

[Gremlins](https://github.com/marmelab/gremlins.js) is a JavaScript library to do "monkey-testing" by providing random user input (clicks, scrolls, and so on).

JavaScript libraries2017-10-22

Handlebars.js

{% raw %} Would render:

JavaScript libraries

Jasmine

Note: This cheatsheet may be a little outdated. Also see the Jest cheatsheet. Jest uses Jasmine, and therefore has similar API. Make your test return a promise.

JavaScript libraries

jQuery

Enables $(':inline')

JavaScript libraries

Meow

[meow](https://npmjs.com/package/meow) is the easiest way to write command line apps for Node.js.

JavaScript libraries2017-10-30

Parsley.js

[Parsley](http://parsleyjs.org/doc/) provides frontend form validation.

JavaScript libraries2018-12-06
data-parsley-validate$('#form').parsley()errorClass+5

Shell.js

[ShellJS](https://github.com/shelljs/shelljs) is a portable (Windows/Linux/OS X) implementation of Unix shell commands on top of the Node.js API.

JavaScript libraries2017-10-27

Sinon

JavaScript libraries2017-10-27

101

[101](https://www.npmjs.com/package/101) is a JavaScript library for dealing with immutable data in a functional manner.

JavaScript libraries2017-09-21

Angular.js

<https://github.com/angular/angularseed <https://angularjs.org/

JavaScript libraries

Backbone.js

Collection: add (model, collection, options)

JavaScript libraries2018-12-06

Blessed

JavaScript libraries

Browserify

Browserify is a bundler for JavaScript. <https://browserify.org/

JavaScript libraries

Browsersync

npm i g browsersync browsersync.io

JavaScript libraries

Commander.js

<https://github.com/tj/commander.js/ var cli = require('commander');

JavaScript libraries

Deku v2

Quick reference for [Deku](https://www.npmjs.com/package/deku), a minimal virtual DOM library.

JavaScript libraries

Ember.js

{% raw %} Router.map(function() {

JavaScript libraries

Express.js

JavaScript libraries

Fastify

Fastify lets you create HTTP servers in Node.js with good performance. This guide targets fastify v0.28.x. Fastify source code (github.com)

JavaScript libraries2017-09-23

Gulp

gulprubysass gulpautoprefixer

JavaScript libraries

Harvey.js

[Harvey.js](http://harvesthq.github.io/harvey/) helps you build responsive interfaces.

JavaScript libraries

Immutable.js

JavaScript libraries

Jade

JavaScript libraries

jQuery CDN

JavaScript libraries

js-model

<http://benpickles.github.io/jsmodel/

JavaScript libraries

jscoverage

A small guide into installing [jscoverage](https://npmjs.com/package./jscoverage). Also see [mocha-blanket](./mocha-blanket).

JavaScript libraries

Jshint

Enable these options to not throw errors in these conditions. See: Relaxing

JavaScript libraries2017-09-12

Koa

Koa is a web framework for Node.js. <https://koajs.com/

JavaScript libraries

Middleman 3

NB: This is for Middleman 3, not Middleman 4+. compassconfig do config

JavaScript libraries

minimist

All options are optional, but it's recommended you set string and boolean at least. All options are optional.

JavaScript libraries

Mobx

asMap(obj) JS map (dynamic keys) asReference(fn) don't observe me

JavaScript libraries2018-05-14

Mocha blanket

Use [blanket](https://npmjs.com/package/blanket) for easy coverage reporting for Mocha JavaScript tests.

JavaScript libraries

Mocha HTML

This is a mocha template that loads js/css from cdn.

JavaScript libraries

Mocha.js

mocha.setup('bdd'); describe('something', function() {

JavaScript libraries

Mocha.js TDD interface

mocha.setup('tdd'); suite('something', function() {

JavaScript libraries

Modella

[Modella](https://www.npmjs.com/package/modella) allows you to create simple models in JavaScript. This is a guide on basic usage of Modella in CoffeeScript.

JavaScript libraries

Modernizr

<script src='//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js'</script JavaScript

JavaScript libraries

Moment.js

This parses the given date using the given format. Returns a moment object. See datetime for more.

JavaScript libraries2018-09-15

Nock

JavaScript libraries

Nopt

<https://www.npmjs.org/package/nopt

JavaScript libraries

Parsimmon

<https://github.com/jneen/parsimmon/blob/master/API.md

JavaScript libraries

Polyfill.io

Polyfill.io is a service that serves JavaScript polyfills.

JavaScript libraries2024-06-26

Q.js

<https://github.com/kriskowal/q <https://github.com/kriskowal/q/wiki/APIReference

JavaScript libraries

Qunit

A quick reference for the [QUnit](https://yarnpkg.com/package/qunit) testing library in JavaScript.

JavaScript libraries

Ractive.js

{% raw %} Ractive is a UI library for JavaScript.

JavaScript libraries

Riot.js

Riot is a UI library for JavaScript. <https://riot.js.org/

JavaScript libraries

Rollup.js

[Rollup](https://rollupjs.org/) Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application.

JavaScript libraries2020-01-29
rollup.watchbundlerollup.config.js

Sequelize

Sequelize is an ORM for JavaScript. <https://sequelize.org/

JavaScript libraries

Sinon-chai

Sinonchai expect(spy).called

JavaScript libraries

Spine

Spine is an MVC framework for JavaScript. <https://spine.github.io/

JavaScript libraries

Stencil

[Stencil](https://github.com/ionic-team/stencil) is a compiler for web components made by the Ionic team. This guide targets Stencil v0.0.5.

JavaScript libraries2019-05-08
@Component@Prop()@State()+5

Superagent

JavaScript libraries2018-04-21

Tape

JavaScript libraries

TypeScript

TypeScript is just like ES2015 with typechecking. All ES2015 (classes, etc) should work.

JavaScript libraries

Underscore-string

// Use it like so: .str.trim("hey");

JavaScript libraries

Universal JS module loader

<https://github.com/umdjs/umd js

JavaScript libraries

Virtual-dom

See <https://www.npmjs.com/package/virtualdom

JavaScript libraries

Vows

Vowsjs.org vows = require "vows"

JavaScript libraries

Webpack

This is a very basic "getting started with Webpack" guide for use with [Webpack](https://webpack.js.org) v3. This doesn't cover all features, but it should get you started in understanding the config file format.

JavaScript libraries2017-09-26

Weinre

[weinre](https://www.npmjs.com/package/weinre) is a remote Web inspector. Note that it has been deprecated since 2016.

JavaScript libraries

Yargs

JavaScript libraries

Zombie

[Zombie](http://zombie.js.org/) is a full-stack testing solution for Node.js.

JavaScript libraries

Ruby libraries14

Capybara

visit articlespath Positive Negative

Ruby libraries2020-06-13

Factory Bot

Factory Bot is a helper for writing factories for Ruby tests. It was previously known as Factory Girl. For older versions, use FactoryGirl instead of FactoryBot. Factory Bot documentation (rubydoc.inf

Ruby libraries2020-07-06
FactoryBot.define dofactory :userfirst_name 'John'+1

Meta-tags gem

Works in a controller or a view. This creates config/initializers/metatags.rb that you can edit.

Ruby libraries2017-09-08

Ronn

Ronn generates Man pages. See [ronn(1)](https://rtomayko.github.io/ronn/ronn.1.html), [ronn-format(7)](https://rtomayko.github.com/ronn/ronn-format.7.html). Also see it on GitHub: [rtomayko/ronn](httpss://github.com/rtomayko/ronn).

Ruby libraries2017-10-15

Slim

You can use parentheses, brackets, or none at all. You can use Ruby expressions in attributes.

Ruby libraries

Chunky PNG

Loads from file.png. Writes an image to newfile.png.

Ruby libraries

Do gem

DAddYE/do server = DO::Server.new('srv1', 'srv1.domain.local', 'root', :key =

Ruby libraries

FFaker

Ruby libraries2017-09-12

Machinist

Machinist is a fixture management library for Ruby. <https://github.com/notahat/machinist

Ruby libraries

Packs (ruby)

Packs are a specification for an extensible packaging system to help modularize Ruby applications.

Ruby libraries2024-07-05

Pry

Pry is a runtime development console for Ruby. <https://github.com/pry/pry

Ruby libraries

PSD.rb

[PSD.rb](https://github.com/layervault/psd.rb) parses Photoshop documents in Ruby.

Ruby libraries

rack-test

See rack/test.rb.

Ruby libraries

Sequel

Sequel is a database toolkit for Ruby. <https://github.com/jeremyevans/sequel

Ruby libraries

Uncategorized37

Date & time formats

UNIX strftime Used by Ruby, date, and more Moment.js Used by Moment.js, datefns, and more

Uncategorized2017-11-27

strftime format

The strftime format is the standard date formatting for UNIX. It's used in C, Ruby, and more.

Uncategorized2017-11-27

Semver

Given a version number MAJOR.MINOR.PATCH: MAJOR incompatible API changes

Uncategorized2019-12-31

Screen resolutions

Resolution DPPX Actual resolution DPPI Actual PPI Size Devices 320 x 480 @1x 320 x 480 163 ppi 163 ppi 3.5" iPhone 2G/3G/3GS

Uncategorized2020-07-03

Watchman

Adds ./src to the watch list. Adds a trigger called retest to run npm test every time .js changes in ./src.

Uncategorized2017-10-18
watchman watch ~/srcwatchman watch-listwatchman -- trigger ~/rsc remake '*.js' -- make

Apache Cordova

A quick reference to common [Apache Cordova](https://cordova.apache.org/) commands.

Uncategorized

Caskroom index

abetterfinderattributes abetterfinderrename

Uncategorized

Cheatsheet styles

This is a reference of styles that you can use on Devhints cheatsheets. How meta! You can refer to this when contributing your own cheatsheets to the [GitHub repo](https://github.com/rstacruz/cheatsheets/).

Uncategorized2017-10-26

Command line stuff

ls [options] [paths] Switch Description

Uncategorized

Devise

Devise is a flexible authentication gem.

Uncategorized

Divshot

Divshot was a static hosting platform. <https://divshot.com/

Uncategorized

Figlet

Run figlet with f <font to use a font. Figlet comes with support for Toilet fonts, which are in {share}/figlet. This is not the default font dir, so you'll have to use d <path to access it.

Uncategorized2018-06-14

Firebase

<https://www.firebase.com/docs/web/api/ <https://www.firebase.com/docs/web/recipes.html

Uncategorized

Firefox

CSS: variables CSS: Allow lineheight in <input type='button'

Uncategorized

Food delivery (Philippines)

Food delivery numbers & sites for top restaurant chains in Metro Manila. For numbers outside Metro Manila, check their websites.

Uncategorized

Freenode

Uncategorized

Google Analytics

// Analytics.js ga('create', 'UAXXXXY', 'auto');

Uncategorized

Google Webfonts

Short snippets on using [Google Webfonts](https://google.com/fonts) in a web page.

Uncategorized

Imagemagick

A quick reference for common [Imagemagick](https://www.imagemagick.org) commands and switches.

Uncategorized

iOS Provisioning Profiles

Development deploy to an iPhone via XCode Adhoc deploy via testflightapp.com

Uncategorized

Less.js

unit(30px / 5px) = 6 unit(5, px) = 5px

Uncategorized

Licenses

Uncategorized2017-08-30

Linux

$ chmod +rwx App $ ./App

Uncategorized

Lua

<https://www.lua.org/pil/13.html <http://luausers.org/wiki/ObjectOrientedProgramming

Uncategorized

Make for assets

bin := ./nodemodules/.bin stylus := $(bin)/stylus

Uncategorized

Nocode

[Nocode](https://github.com/kelseyhightower/nocode) is the best way to write secure and reliable applications. Write nothing; deploy nowhere.

Uncategorized2018-03-17

Phusion Passenger

This is an example nginx configuration.

Uncategorized

PlantUML

PlantUML is a markup language for creating diagrams. <https://plantuml.com/

Uncategorized

Premailer

[Premailer](https://github.com/premailer/premailer/) is a Ruby library that inlines CSS into HTML.

Uncategorized

Saucelabs

Sign up for opensauce: http://saucelabs.com/opensauce

Uncategorized

SimpleForm

Uncategorized

Social media images

What Dimensions : :

Uncategorized

Spreadsheet functions

Uncategorized

Ubuntu

aptitude search mysql Look for something dpkg S which tsclient What package does it belong to?

Uncategorized

Unicode symbols

✈ \u2708 airplane ❄ \u2744 snowflake

Uncategorized

Vainglory

Use CP WP Util Antiarmor/shield [Myth][BM] [Bonesaw][BS], [Tension][TB]

Uncategorized

ZNC bouncer

A quick reference to the [ZNC](https://znc.bg) IRC bouncer's common commands.

Uncategorized