/*
|_ | | | | / \ | \ | | |/ / \ \ / / _ | | | | | | | || | / _ \ | | | ' / \ V / | | | | | | | | | _ |/ ___ | |\ | . \ | || || | || | || || |// __| _||_\ || _/ _/
500,000 DAMN SUBSCRIBERS ON THE SYNTHDEF CHANNEL
/*
|_ | | | | / \ | \ | | |/ / \ \ / / _ | | | | | | | || | / _ \ | | | ' / \ V / | | | | | | | | | _ |/ ___ | |\ | . \ | || || | || | || || |// __| _||_\ || _/ _/
500,000 DAMN SUBSCRIBERS ON THE SYNTHDEF CHANNEL
In production, it is recommended to minify any JavaScript code that is included with your application. Minification can help your website load several times faster, especially as the size of your JavaScript source code grows.
Here's one way to set it up:
npm init -y
in your project folder (don't skip this step!)npm install terser
Now, to minify a file called like_button.js
, run in the terminal:
If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:
let
and const
statements. For the purposes of the React documentation, you can consider them equivalent to var
.class
keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this
in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav# The command finds the most recent tag that is reachable from a commit. | |
# If the tag points to the commit, then only the tag is shown. | |
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object | |
# and the abbreviated object name of the most recent commit. | |
git describe | |
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix: | |
git describe --abbrev=0 | |
# other examples |
// A very simple kOS script for hovering. | |
// Control Flags. | |
set hovering to false. | |
set ascending to false. | |
set descending to false. | |
set end_program to false. | |
// Hovering Altitude and Velocity. | |
set target_alt to 0. |
function randomDate(start, end) { | |
return new Date(start.getTime() + Math.random() * (end.getTime() - start.getTime())) | |
} | |
console.log(randomDate(new Date(2012, 0, 1), new Date())) |
# Download and Install the Latest Updates for the OS | |
apt-get update && apt-get upgrade -y | |
# Set the Server Timezone to CST | |
echo "America/Chicago" > /etc/timezone | |
dpkg-reconfigure -f noninteractive tzdata | |
# Enable Ubuntu Firewall and allow SSH & MySQL Ports | |
ufw enable | |
ufw allow 22 |
<?php | |
class Predek { | |
private $privatePromenna = 1; | |
protected $protectedPromenna = 2; | |
public $publicPromenna = 3; | |
private function privateGetPrivate() { | |
return $this->privatePromenna; | |
} |
<?php | |
require_once "jBBCode" . DIRECTORY_SEPARATOR . "Parser.php"; | |
/** | |
* Implements a [list] code definition that provides the following syntax: | |
* | |
* [list] | |
* [*] first item | |
* [*] second item |
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.