Skip to content

Instantly share code, notes, and snippets.

View timvisee's full-sized avatar
Consuming coffee

Tim Visée timvisee

Consuming coffee
View GitHub Profile
########################################################################
# #
# .htaccess #
# Default .htaccess file for Carbon CMS. #
# @author Tim Visee #
# @website http://timvisee.com/ #
# @copyright Copyright © Tim Visee 2012-2013, All rights reserved. #
# #
########################################################################
<?php
/**
* DateTime.php
*
* A class to representation date and time as an object.
* This class allows you to get the current date and time of the server, to format the date and time in many different
* ways using different timezones and also to travel through time.
* Note: Even though this class uses futuristic technology to make date and time calculations, it doesn't allow humans
* to travel through time.
@timvisee
timvisee / datetime_DateTime.php
Created May 8, 2015 16:40
Carbon CMS DateTime classes snapshot at 2015-05-08 18:40:00
<?php
/**
* DateTime.php
*
* A class to representation date and time as an object.
* This class allows you to get the current date and time of the server, to format the date and time in many different
* ways using different timezones and also to travel through time.
* Note: Even though this class uses futuristic technology to make date and time calculations, it doesn't allow humans
* to travel through time.
@timvisee
timvisee / ReactionWheelController.py
Created September 3, 2015 16:52
A reaction wheel controller example by Tim Visee
# -*- coding: utf-8 -*-
"""
Reaction wheel controller, by Tim Visee.
@author: Tim Visee
"""
import serial
import time
@timvisee
timvisee / challenge.1.1.java
Created September 7, 2015 11:30
Challenge 1.1
package com.timvisee.hhs;
public class Main {
/**
* Main method called on start.
*
* @param args Startup arguments.
*/
public static void main(String[] args) {
@timvisee
timvisee / challenge1.2.java
Created September 7, 2015 11:32
Challenge 1.2
package com.timvisee.hhs;
public class Main {
/** Variable count. */
public static final int VAR_COUNT = 3;
/**
* Main method called on start.
*
@timvisee
timvisee / challenge1.3.java
Created September 7, 2015 11:35
Challenge 1.3
package com.timvisee.hhs;
public class Main {
/** The maximum value of the sum. */
public static final int MAX = 10;
/**
* Main method called on start.
*
@timvisee
timvisee / VPSscript-0.1.1.sh
Created September 10, 2015 20:00
VPSscript 0.1.1
#!/bin/bash
# VPS setup script by Tim Visee
APP_NAME="VPS-Builder";
APP_VERSION_NAME="0.1";
APP_VERSION_CODE=1;
LOG_PREFIX="[$APP_NAME] ";
LOG_PREFIX_ERROR="[ERROR] "
# Configuration
@timvisee
timvisee / exchange.php
Last active August 6, 2022 16:59
Live currency exchange script, to retrieve the current exchange rates betwee to currencies, live from the internet.
<?php
/**
* Live currency exchange script.
* This script allows you to retrieve the current currency exchanges, live, from the internet.
*
* This script is developed by Tim Visee, for educational purposes.
* The Yahoo currency exchange API is used to retrieve the live exchange rates.
*
* ---
package com.timvisee.safecreeper.block.state;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import org.bukkit.Bukkit;
import org.bukkit.block.Block;
import org.bukkit.block.BlockState;
import org.bukkit.entity.LivingEntity;
import org.bukkit.inventory.ItemStack;