Skip to content

Instantly share code, notes, and snippets.

View hsbiti's full-sized avatar
🎯
Focusing

Hamza Sbiti hsbiti

🎯
Focusing
  • Lausanne
  • 02:50 (UTC +01:00)
View GitHub Profile
#!/bin/bash
RED='\033[0;31m'
NC='\033[0m' # No Color
echo "Trying to curl every IP on your network"
for IP in $(arp -a |grep 192 |awk '{print $2}' |sed -r 's/\(//g' | sed -r 's/\)//g')
do
echo -e "${RED}TESTING: $IP${NC}"
curl http://$IP
@kottenator
kottenator / simple-pagination.js
Created July 13, 2015 20:44
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;