Skip to content

Instantly share code, notes, and snippets.

View miyurusankalpa's full-sized avatar
💭
how to quit vim?

Miyuru Sankalpa miyurusankalpa

💭
how to quit vim?
View GitHub Profile
@atoonk
atoonk / AWS_v4prefixes.md
Last active April 28, 2024 06:48
AWS prefixes

Summary

Total number of IPv4 addresses: 100,750,168. That’s the equivalent of just over six /8’s Also see this blog: https://toonk.io/aws-and-their-billions-in-ipv4-addresses/

just for fun, let's put a value number on that

Total value at, $20 per IP: => $2,015,003,360

Total value at, $25 per IP: => $2,518,754,200

@tambry
tambry / Steam.ps1
Created October 4, 2019 15:16
Script for scraping AAAA records of Steam content servers.
$end = 3000
$folder_name = Get-Date -UFormat %Y-%m-%d
$folder_name = 'Steam/' + $folder_name
New-Item -Path $folder_name -ItemType Directory -Force | Out-Null
For ($i=0; $i -lt $end; $i++)
{
$path = "valve$i.steamcontent.com"
Write-Progress -Activity "Scanning $path" -Status "$i/$end" -PercentComplete (($i * 100) / $end)
@inopinatus
inopinatus / AllowDescribeNetworkInterfacesAndAssignIpv6Address
Last active January 26, 2020 11:12
OpWorks Stacks managed instance self-update to have IPv6 address.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"ec2:DescribeNetworkInterfaces",
"ec2:AssignIpv6Addresses"
],
@mcmanus
mcmanus / trrprefs.md
Last active December 27, 2022 05:17 — forked from bagder/trrprefs.md
trr prefs

Preferences

All preferences for the DNS-over-HTTPS (DoH) functionality in Firefox are located under the "network.trr" prefix (TRR == Trusted Recursive Resolver). The support for these landed in Firefox 60 and has been improved in Firefox 61. Goto about:config to set these preferences.

Some users have reported needing to restart to have the changes take effect. The DNS tab of the about:networking page will indicate whether a name was resolved via TRR or not.

network.trr.mode

set this preference to 2 to enable DoH in a mode where DoH is used as the first choice for DNS, but it will still fallback to native DNS for full backwards compatibility. Set to 0 to disable DoH.

@jonathanhoskin
jonathanhoskin / reboot-modem.js
Last active September 29, 2021 13:34
Huawei B315 Modem Reboot Script
// PhantomJS script to reboot a Huawei B315 modem
//
// Author: Jonathan Hoskin / 2017-09-02
// Twitter: @jhossnz
// Github: https://github.com/jonathanhoskin
//
// Requires PhantomJS ~ 2.1.1
//
// Enter your own modem details here
var username = 'admin';
@denisu
denisu / fastly.txt
Created June 18, 2017 21:08
Fastly IPv6 Hosts
2a04:4e42::1 5742636757417984-fe1.pantheonsite.io
2a04:4e42::2 5724160613416960-fe2.pantheonsite.io
2a04:4e42::3 5746821397741568-fe3.pantheonsite.io
2a04:4e42::4 5714315743068160-fe4.pantheonsite.io
2a04:4e42::72 *.avvosites.com
2a04:4e42::74 www.aclu.org
2a04:4e42::78 *.twimg.com
2a04:4e42::79 *.wixstatic.com
2a04:4e42::80 admin.wes.bibbed.org
2a04:4e42::81 www.bbc.com
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active May 25, 2024 02:19
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@hootlex
hootlex / laravellocal.md
Last active May 3, 2024 08:06
Run laravel project locally

##Windows users:

cmder will be refered as console

##Mac Os, Ubuntu and windows users continue here:

  • Create a database locally named homestead utf8_general_ci
@msurguy
msurguy / install.sh
Last active August 30, 2021 21:18
Installing VIPS on Digital Ocean (Ubuntu 14). VIPS (http://www.vips.ecs.soton.ac.uk/) is super fast image processor that performs faster than anything else. Please read the comments for even quicker install
cat ~/.ssh/id_rsa.pub | ssh forge@yourserverIP "cat >> ~/.ssh/authorized_keys"
ssh 'forge@yourserverIP'
mkdir vips
cd vips
wget -c http://www.vips.ecs.soton.ac.uk/supported/current/vips-7.38.5.tar.gz
tar xzvf vips-7.38.5.tar.gz
cd vips-7.38.5/
@jaredkng
jaredkng / email-error-logs.sh
Created July 28, 2013 22:09
Bash script to e-mail errors that show up in my nginx error log since the previous day
#!/bin/bash
SITES=( dev.inspirevive.com invoicedapp.com invoice-generator.com infuse.jaredtking.com jaredtking.com printable-calendar.co )
DATE_FORMAT="+%Y/%m/%d"
YESTERDAY=$(date --date="yesterday" $DATE_FORMAT)
TODAY=$(date $DATE_FORMAT)
function parseLog {
NUM_ERRORS=0