This will give you complete intellisense and type safety within your app and CSS modules
🚨 NOTE
- refactoring className from ts file wont update your css/scss className, to change class names you have to change it within your
.module.scss
file
const DOT_RADIUS = 10; // Radius of the dots | |
let GLOBE_RADIUS = width / 3; // Radius of the globe based on the canvas width | |
class Dot { | |
constructor() { | |
this.theta = Math.random() * 2 * Math.PI; // Random value between [0, 2Pi] | |
this.phi = Math.acos((Math.random() * 2) - 1); // Random value between [0, Pi] | |
// The x, y, z coordinates will be calculated in the project() function | |
this.x = 0; |
let PERSPECTIVE = width * 0.8; // The field of view of our 3D scene | |
let PROJECTION_CENTER_X = width / 2; // x center of the canvas | |
let PROJECTION_CENTER_Y = height / 2; // y center of the canvas | |
const dots = []; // Store every particle in this array | |
class Dot { | |
constructor() { | |
this.x = (Math.random() - 0.5) * width; // Give a random x position | |
this.y = (Math.random() - 0.5) * height; // Give a random y position | |
this.z = Math.random() * width; // Give a random z position |
$ git clone [email protected]:xxxxx/xxxx.git my-awesome-proj | |
Cloning into 'my-awesome-proj'... | |
ssh: connect to host github.com port 22: Connection timed out | |
fatal: Could not read from remote repository. | |
$ # This should also timeout | |
$ ssh -T [email protected] | |
ssh: connect to host github.com port 22: Connection timed out | |
$ # but this might work |
package main | |
import ( | |
"container/heap" | |
"fmt" | |
) | |
type Item struct { | |
Name string | |
Expiry int |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
function splitLoop(items, process, context, callback) { | |
var todo = items.concat(); | |
setTimeout(function () { | |
var start = +new Date(); | |
do { | |
process.call(context, todo.shift()); | |
} while (todo.length > 0 && (+new Date() - start < 50)); | |
<?php | |
require("class.phpmailer.php"); | |
$mail = new PHPMailer();$mail = new PHPMailer(); | |
$mail->IsSMTP(); | |
$mail->Host = "smtp1.example.com;smtp2.example.com"; | |
$mail->SMTPAuth = true; | |
$mail->Username = 'smtpusername'; | |
$mail->Password = 'smtppassword'; | |
$mail->From="[email protected]"; |
# | |
# Slightly tighter CORS config for nginx | |
# | |
# A modification of https://gist.github.com/1064640/ to include a white-list of URLs | |
# | |
# Despite the W3C guidance suggesting that a list of origins can be passed as part of | |
# Access-Control-Allow-Origin headers, several browsers (well, at least Firefox) | |
# don't seem to play nicely with this. | |
# |
#!/bin/bash | |
# Installation script for a Wordpress 3.0 website on Ubuntu 10.04 | |
# | |
# Josh Kersey | |
# Created: May 15, 2012 | |
# Last Update: June 13, 2012 | |
# get setup parameters | |
echo "apache vhost name (one word):" |