Skip to content

Instantly share code, notes, and snippets.

View joho1968's full-sized avatar
🐒
Converting caffeine to code

Joaquim Homrighausen joho1968

🐒
Converting caffeine to code
View GitHub Profile
@mjackson
mjackson / color-conversion-algorithms.js
Last active November 6, 2024 18:45
RGB, HSV, and HSL color conversion algorithms in JavaScript
/**
* Converts an RGB color value to HSL. Conversion formula
* adapted from http://en.wikipedia.org/wiki/HSL_color_space.
* Assumes r, g, and b are contained in the set [0, 255] and
* returns h, s, and l in the set [0, 1].
*
* @param Number r The red color value
* @param Number g The green color value
* @param Number b The blue color value
* @return Array The HSL representation
@jniltinho
jniltinho / install_redmine_nginx.sh
Last active January 3, 2018 10:51
Install Redmine on Debian 8.7 64Bits + Nginx
#!/bin/bash
## Install Redmine + Nginx
## Tested on Debian 8.7 64Bits
## Author: Nilton OS -- www.linuxpro.com.br
## Version: 0.1
# Check if user has root privileges
if [[ $EUID -ne 0 ]]; then
echo "You must run the script as root or using sudo"
@patriclougheed
patriclougheed / streamer.conf
Last active May 7, 2023 14:24
YouPHPTube Streamer NginX Conf
server {
listen 80;
server_name <domain> <www.domain>;
root /var/www;
index index.php;
charset utf-8;
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }