virtualenv venv -p /usr/local/bin/python3
source ./venv/bin/activate
pip freeze > requirements.txt
pip install -r requirements.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using Ubuntu | |
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
sudo npm cache clean -f | |
sudo npm install -g n | |
sudo n stable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// Gulp Plugins | |
var gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
livereload = require('gulp-livereload'), | |
autoprefixer = require('gulp-autoprefixer'); | |
// Gulp Config | |
var input = 'scss/**/*.scss', | |
output = 'css', | |
sassConfig = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ThemosisValetDriver extends BasicValetDriver | |
{ | |
/** | |
* Determine if the driver serves the request. | |
* | |
* @param string $sitePath | |
* @param string $siteName | |
* @param string $uri | |
* @return bool |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const makanan = [ | |
'Sate dan Nasi', | |
'Nasi Goreng', | |
'Mie Rebus', | |
'Nasi Bakar', | |
'Tempe Goreng', | |
'Mie Goreng', | |
'Ikan Bakar', | |
'Nasi Uduk', | |
'Kerupuk', |
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
This sheet goes along with this SSH YouTube tutorial
$ ssh [email protected]
$ mkdir test
$ cd test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
OlderNewer