Skip to content

Instantly share code, notes, and snippets.

View navidshad's full-sized avatar
🏠
Working at home

Navid navidshad

🏠
Working at home
View GitHub Profile
@lifenautjoe
lifenautjoe / random_hex_color.dart
Created December 13, 2018 16:08
Random Hex Color Dart
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;
@leonardocordeiro
leonardocordeiro / squid.conf
Created August 19, 2017 04:33
allow all on 3128 - squid proxy
#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
@Anthodpnt
Anthodpnt / smooth-scroll.js
Last active December 30, 2023 08:32
Misc - Smooth Scroll
/**
* 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
@companje
companje / socket.io-stream-server-to-browser.js
Created September 9, 2014 13:55
socket.io-stream from NodeJS Server to Browser
/////////////////////////////
// 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');