Skip to content

Instantly share code, notes, and snippets.

View PeterDaveHello's full-sized avatar

Peter Dave Hello PeterDaveHello

View GitHub Profile
@n0531m
n0531m / list_gcp_iprange.sh
Last active April 17, 2024 21:50
Google Cloud Platform : ip address range
#!/bin/bash
# https://cloud.google.com/compute/docs/faq#find_ip_range
# nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8
myarray=()
for LINE in `dig txt _cloud-netblocks.googleusercontent.com +short | tr " " "\n" | grep include | cut -f 2 -d :`
do
myarray+=($LINE)
for LINE2 in `dig txt $LINE +short | tr " " "\n" | grep include | cut -f 2 -d :`
@davidbalbert
davidbalbert / gist:6815258
Last active February 29, 2024 16:12
How to install custom SSL certificates on an ASUS RT-N66U running asuswrt-merlin
###########################################
# IMPORTANT NOTE:
#
# As of asuswrt-merlin 380.67 Beta, you
# can now configure SSL certificates from
# the Webui, making these instructions
# unnecessary.
###########################################
@willurd
willurd / web-servers.md
Last active May 13, 2024 01:24
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@Milly
Milly / gem-fetch-dependencies
Created April 8, 2011 09:43
Extend 'gem fetch' command. Fetch all dependencies.
#!/usr/bin/ruby
require 'rubygems'
require 'rubygems/commands/fetch_command'
class Gem::Commands::FetchCommand
def add_version_option_with_fetch_depends
add_version_option_without_fetch_depends
add_option('-y', '--[no-]dependencies',
"Fetch dependent gems") do |value, options|