This sheet goes along with this SSH YouTube tutorial
$ ssh [email protected]
$ mkdir test
$ cd test
| using namespace System.Management.Automation | |
| using namespace System.Management.Automation.Language | |
| if ($host.Name -eq 'ConsoleHost') | |
| { | |
| Import-Module PSReadLine | |
| } | |
| #Import-Module PSColors | |
| #Import-Module posh-git | |
| Import-Module -Name Terminal-Icons |
| // One of my new favorite React Hook patternms is to create handler | |
| // functions for a custom hook using `React.useMemo` instead of | |
| // `React.useCallback`, like so: | |
| function useBool(initialState = false) { | |
| const [state, setState] = React.useState(initialState) | |
| // Instead of individual React.useCallbacks gathered into an object | |
| // Let's memoize the whole object. Then, we can destructure the | |
| // methods we need in our consuming component. |
| Add-Type -AssemblyName System.Windows.Forms | |
| while ($true) | |
| { | |
| $Pos = [System.Windows.Forms.Cursor]::Position | |
| $x = ($pos.X % 500) + 1 | |
| $y = ($pos.Y % 500) + 1 | |
| [System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y) | |
| Start-Sleep -Seconds 10 | |
| } |
$ ssh [email protected]
$ mkdir test
$ cd test
Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a
I will be using the root user, but would suggest creating a new user
| const makanan = [ | |
| 'Sate dan Nasi', | |
| 'Nasi Goreng', | |
| 'Mie Rebus', | |
| 'Nasi Bakar', | |
| 'Tempe Goreng', | |
| 'Mie Goreng', | |
| 'Ikan Bakar', | |
| 'Nasi Uduk', | |
| 'Kerupuk', |
| class Vehicle { | |
| constructor(color, wheels, state) { | |
| if(this.constructor == Vehicle) throw new Error('Vehicle is abstarct class') | |
| } | |
| getColor() { throw new Error('getColor must be emplemented')} | |
| getWheels() { throw new Error('getWheels must be emplemented')} | |
| getState() { throw new Error('getState must be emplemented')} | |
| } | |
| class Car extends Vehicle { |
| <?php | |
| class ThemosisValetDriver extends BasicValetDriver | |
| { | |
| /** | |
| * Determine if the driver serves the request. | |
| * | |
| * @param string $sitePath | |
| * @param string $siteName | |
| * @param string $uri | |
| * @return bool |
| 'use strict'; | |
| /** | |
| * Gulp Requiretment | |
| * @type {[type]} | |
| */ | |
| var gulp = require('gulp'); | |
| var pug = require('gulp-pug'); | |
| var sass = require('gulp-sass'); | |
| var sourcemaps = require('gulp-sourcemaps'); |