Skip to content

Instantly share code, notes, and snippets.

@pahud
pahud / list_elb_from_instanceId.sh
Created August 17, 2016 08:02
list all registered ELB name from a given EC2 instanceId
#!/bin/bash
instanceId='i-XXXXXXXXXXXXX'
aws elb describe-load-balancers --query \
"LoadBalancerDescriptions[?Instances[?InstanceId=='${instanceId}']].LoadBalancerName"
@leonardofed
leonardofed / README.md
Last active May 3, 2024 01:24
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@pahud
pahud / aws-get-credentials.js
Last active November 21, 2022 16:51
AWS CredentialProviderChain example in aws-sdk of NodeJS
'use strict';
var AWS = require('aws-sdk');
//var P = require('bluebird');
var aws_region = process.env['AWS_REGION'] ? process.env['AWS_REGION'] : 'us-west-2'
var aws_profile = process.env['AWS_PROFILE'] ? process.env['AWS_PROFILE'] : 'default'
AWS.CredentialProviderChain.defaultProviders = [
@yorkxin
yorkxin / README.md
Last active August 21, 2019 17:40
Proxy to remote server with CORS support

cors.py for mitmproxy

Hacking CORS restriction to enable in-browser XHR to any server.

Usage

Say you are running an web app at localhost, and you want to send XHR to http://remote-server:80, but the CORS restriction forbids access because you are sending requests from an origin that remote-server:80 does not allow.

Run:

@edokeh
edokeh / index.js
Last active May 6, 2024 01:02
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
[submodule "zsh-syntax-highlighting"]
path = zsh-syntax-highlighting
url = git://github.com/zsh-users/zsh-syntax-highlighting.git
@zonble
zonble / FacebookTestAccount.py
Last active December 25, 2016 13:43
A tool which helps to create and delete test account for Facebook.
import urllib, urllib2, json
'''
The ``FacebookTestUserManager`` module
======================================
Author: Weizhong Yang <zonble at gmail dot com>
A tool which helps to create and delete test account for Facebook.
anonymous
anonymous / gist:4412635
Created December 30, 2012 12:35
# Extract Service Object
@peterc
peterc / irb3.rb
Created September 19, 2011 14:17
irb3 - Run an IRB-esque prompt over multiple Ruby implementations at once using RVM
#!/usr/bin/env ruby
# encoding: utf-8
# irb3 - Runs an IRB-esque prompt (but it's NOT really IRB!) over multiple
# versions of Ruby at once (using RVM)
#
# By Peter Cooper, BSD licensed
#
# Main dependency is term-ansicolor for each impl:
# rvm exec gem install term-ansicolor