Skip to content

Instantly share code, notes, and snippets.

import boto3
import botocore
from time import sleep
import requests
import ipaddress
interesting_address = [
'3.0.0.3',
'3.0.0.1',
@xirixiz
xirixiz / Set up GitHub push with SSH keys.md
Last active April 21, 2025 17:59 — forked from developius/README.md
Set up GitHub push with SSH keys

SSH keypair setup for GitHub (or GitHub/GitLab/BitBucket, etc, etc)

Create a repo.

Make sure there is at least one file in it (even just the README.md)

Generate a SSH key pair (private/public):

ssh-keygen -t rsa -C "[email protected]"
@nicbou
nicbou / ChromeCastService.js
Created November 20, 2017 22:04
[JS] How to send videos with subtitles to a ChromeCast device
class ChromeCastService {
constructor() {
this.castSession = null;
this.sessionRequest = new chrome.cast.SessionRequest(chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID);
const apiConfig = new chrome.cast.ApiConfig(
this.sessionRequest,
(session) => { // sessionListener
console.log('Received ChromeCast session', session)
this.castSession = session;
@joshbeckman
joshbeckman / animatedScrollTo.js
Created September 30, 2013 14:51
ScrollTo animation using pure javascript and no jquery
document.getElementsByTagName('button')[0].onclick = function () {
scrollTo(document.body, 0, 1250);
}
function scrollTo(element, to, duration) {
var start = element.scrollTop,
change = to - start,
currentTime = 0,
increment = 20;
@baygross
baygross / Manhattan Geocoded Boundary
Last active May 22, 2019 10:29
The default 'maps' package for R contains bounded polygons defining various regions around the world. One such region is Manhattan, although in this instance the polygon points are shifted off of the island's true location by a significant degree. In some use-cases, this discrepancy may prove unacceptable. Actual bounding coordinates for Manhatt…
lat long
40.700292, -74.010773
40.707580, -73.999271
40.710443, -73.978758
40.721762, -73.971977
40.729568, -73.971291
40.733503, -73.973994
40.746834, -73.968072
40.775114, -73.941936
40.778884, -73.942580