Skip to content

Instantly share code, notes, and snippets.

View niiicolai's full-sized avatar

Nicolai B. Andersen niiicolai

View GitHub Profile
@niiicolai
niiicolai / renewletsencryptheroku.rb
Last active May 28, 2017 10:06
Renew Let's encrypt certificate Heroku letsencrypt_plugin
# 1. Open a terminal.
# 2. Enter "heroku run rake letsencrypt_plugin --app <APP NAME>"
# 3. You will see the following output in the terminal.
# I, [2017-02-21T22:16:46.751310 #4] INFO -- : Trying to register at Let's Encrypt service...
# I, [2017-02-21T22:16:46.751387 #4] INFO -- : Loading private key...
# I, [2017-02-21T22:16:47.071975 #4] INFO -- : Acme::Client::Error::Malformed - Registration key is already in use
# I, [2017-02-21T22:16:47.072063 #4] INFO -- : Already registered.
# I, [2017-02-21T22:16:47.072101 #4] INFO -- : Sending authorization request for: example.com...
# I, [2017-02-21T22:16:47.211549 #4] INFO -- : Storing challenge information...
// each 'step' we want to draw a rect
// this is therefore also used for the rects' length and height
float stepX = 50;
float stepY = 50;
// the color of the rect we draw everytime the user click
color clickedRectColor = color(255, 0, 0);
// the max rgb value for rects drawed inside setup()
int rbgValueMax = 255;
// A reference to the ball
Ball ball;
// ball radius
float ballRadius = 25;
// ball movement speed
PVector ballSpeedRange = new PVector(3, 7);
// the ball's stroke color
color ballStrokeColor = color(255);
// ball fill colors
class Humanoid extends GameObject {
public HealthController healthCtrl;
public Animator animator;
Humanoid(PVector _position, PVector _size,
float _maxHealth, AnimationState[] animationStates) {
// Execute GameObject constructor
super(_position, _size);
// # SÅDAN LAVER DU EN SIMPEL HALE PÅ ET OBJECT I PROCESSING
//
// Bemærk der er mange måder at lave ting på og dette er blot en af mange
// Tjek evt. https://processing.org/tutorials/arrays/ for mere info.
//
//
// Lad os antage du gerne vil lave en bold med en hale bagefter.
// Du starter med at definer en 'class' kaldet Ball (eller hvad du ønsker den skal hedde)
class Ball {
using UnityEngine;
public class Movement : MonoBehaviour
{
private Rigidbody rigidbody;
[SerializeField]
private float speed;
[SerializeField]
using UnityEngine;
using UnityEngine.AI;
public class Movement : MonoBehaviour
{
[SerializeField]
private Camera camera;
private string groundTag = "Ground";
/* WeaponController.cs */
using UnityEngine;
public class WeaponController : MonoBehaviour
{
[SerializeField]
private Weapon weapon;
[SerializeField]
private string enemyTag;
/* HealthController.cs */
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
public class HealthController : MonoBehaviour
{
[SerializeField]
private GameObject healthPanel;
/* CoinsController.cs */
using System.Collections.Generic;
using UnityEngine;
public class CoinsController : MonoBehaviour
{
[SerializeField]
private int numberOfCoins;
[SerializeField]