This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
Random random = new Random(); | |
String generateRandomHexColor(){ | |
int length = 6; | |
String chars = '0123456789ABCDEF'; | |
String hex = '#'; | |
while(length-- > 0) hex += chars[(random.nextInt(16)) | 0]; | |
return hex; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Recommended minimum configuration: | |
acl manager proto cache_object | |
acl localhost src 127.0.0.1/32 | |
acl to_localhost dst 127.0.0.0/8 | |
acl localnet src 0.0.0.0/8 192.168.100.0/24 192.168.101.0/24 | |
acl SSL_ports port 443 | |
acl Safe_ports port 80 # http | |
acl Safe_ports port 21 # ftp | |
acl Safe_ports port 443 # https | |
acl Safe_ports port 70 # gopher |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This gist is for Javascript beginners. | |
* @author: Anthony Du Pont <antho.dpnt@gmail.com> | |
* @site: https://www.twitter.com/JsGists | |
* | |
* In episode #11 of "Gist for Javascript Beginners" I explained what was a Linear Interpolation. | |
* In this episode I'll show you another case it's really usefull. | |
* | |
* It's a trend since a few months to add smooth scroll to websites because the look-and-feel is | |
* better than the basic scroll of the browser. But how do you do this kind of effect ? Thanks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///////////////////////////// | |
// NodeJS Server | |
///////////////////////////// | |
var express = require('express'); | |
var app = express(); | |
var http = require('http').Server(app); | |
var io = require('socket.io')(http); | |
var ss = require('socket.io-stream'); | |
var path = require('path'); |