Skip to content

Instantly share code, notes, and snippets.

@4stern
4stern / nginx.conf
Created December 12, 2022 21:45 — forked from nrollr/nginx.conf
NGINX config for SSL with Let's Encrypt certs
# UPDATED 17 February 2019
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
listen [::]:80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
}
# SSL configuration
function A() {
this.test = function() {
console.log('A:test');
};
}
class B extends A {
test() {
console.log('B:test"1');
super.test()
@4stern
4stern / vector.js
Last active November 27, 2015 13:14 — forked from lwe/vector.js
Winkel zwischen zwei Geraden (AB und CD)
// A(x1|y1) und B(x2|y2) = Touch start
// C(x3|y3) und D(x4|y4) = Current touch point
// Vektor AB
var AB_x = x2 - x1;
var AB_y = y2 - y1;
// Vektor CD
var CD_x = x4 - x3;
var CD_y = y4 - y3;
#!/bin/sh
# ------------------------------------------------------------------------------
# SOME INFOS : fairly standard (debian) init script.
# Note that node doesn't create a PID file (hence --make-pidfile)
# has to be run in the background (hence --background)
# and NOT as root (hence --chuid)
#
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts
# INSTALL/REMOVE http://www.debian-administration.org/articles/28
#!/bin/sh
#
# chkconfig: 35 99 99
# description: Node.js /home/nodejs/sample/app.js
#
. /etc/rc.d/init.d/functions
USER="nodejs"