Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Miglen Evlogiev miglen

🎯
Focusing
View GitHub Profile
@miglen
miglen / ec2-instance-prompt.sh
Last active Oct 5, 2020
AWS EC2 Instance Prompt with EC2 ARN Instance Id Public IP Private IP Account Id Region and Instance Name Tag
View ec2-instance-prompt.sh
#!/bin/bash
#
# description: EC2 Instance Prompt
# author: Miglen Evlogiev <github@miglen.com>
#
# deployment: copy this file into /etc/profile.d/ec2-instance-prompt.sh
# sudo wget https://gist.githubusercontent.com/miglen/e2e577b95acf1171a1853871737323ce/raw/ec2-instance-prompt.sh -P /etc/profile.d/
# sudo bash /etc/profile.d/ec2-instance-prompt.sh
#
@miglen
miglen / web-servers.md
Created Mar 9, 2019 — forked from willurd/web-servers.md
Big list of http static server one-liners
View web-servers.md

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
@miglen
miglen / natas.md
Last active Nov 14, 2018
OverTheWire - Natas challenge
View natas.md

URL: http://overthewire.org/wargames/natas/ Type: Web

Natas Level 0

curl -s -u natas0:natas0 http://natas0.natas.labs.overthewire.org

The password is hidden in the source-code.

Natas Level 1

@miglen
miglen / news-feeds-eradicator-linkedin.user.js
Last active Oct 18, 2020
News Feed Eradicator for LinkedIn
View news-feeds-eradicator-linkedin.user.js
// ==UserScript==
// @name News Feed Eradicator for LinkedIn
// @namespace http://miglen.com/
// @version 0.4
// @description News Feed Eradicator for LinkedIn
// @author Miglen Evlogiev (hi@miglen.com)
// @match https://www.linkedin.com/*
// @grant none
// @downloadURL https://gist.github.com/miglen/4f1bccf15b63944675d34149dff0bc3d/raw/news-feeds-eradicator-linkedin.user.js#.user.js
// @updateURL https://gist.github.com/miglen/4f1bccf15b63944675d34149dff0bc3d/raw/news-feeds-eradicator-linkedin.user.js#.user.js
@miglen
miglen / Kernel-panic-ios-safari.html
Created Sep 17, 2018
Kernel-panic-ios-safari.html
View Kernel-panic-ios-safari.html
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
body {
background: repeat url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/7QCIUGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAGscAVoAAxslRxwCAAACAAAcAnQAV8KpIENoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbGQgLSBodHRwOi8vd3d3LnJlZGJ1YmJsZS5jb20vcGVvcGxlL0NoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlubwIQAABtbnRyUkdCIFhZWiAHzgACAAkABgAxAABhY3NwTVNGVAAAAABJRUMgc1JHQgAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLUhQICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFjcHJ0AAABUAAAADNkZXNjAAABhAAAAGx3dHB0AAAB8AAAABRia3B0AAACBAAAABRyWFlaAAACGAAAABRnWFlaAAACLAAAABRiWFlaAAACQAAAABRkbW5kAAACVAAAAHBkbWRkAAACxAAAAIh2dWVkAAADTAAAAIZ2aWV3AAAD1AAAACRsdW1pAAAD+AAAABRtZWFzAAAEDAAAACR0ZWNoAAAEMAAAAAxyVFJDAAAEPAAACAxnVFJDAAAEPAAACAxiVFJDAAAEPAAACAx0ZXh0AAAAAENvcHlyaWdodCAoYykgMTk5OCBIZXdsZXR0LVBhY2thcmQgQ29tcGFueQAAZGVzYwAAAAAAAAASc1JHQiBJRUM2MTk2Ni0yLjEAAAAAAAAAAAAAABJzUkdCIElFQzYxOTY2LTIuMQAAAAAAA
@miglen
miglen / gmail_redirect.user.js
Created Aug 16, 2018
Greasemonkey (Tampermonkey) script to redirect Inbox.Google.com to Gmail.com
View gmail_redirect.user.js
// ==UserScript==
// @name Gmail Redirect
// @namespace http://inbox.google.com/
// @version 0.1
// @description Redirect Inbox.Google.com to Gmail.com
// @author github@miglen.com
// @match https://inbox.google.com/*
// @grant none
// ==/UserScript==
@miglen
miglen / hacks.sh
Created Aug 1, 2018
MacOs scripts & hacks
View hacks.sh
# Just a list of hacks
set_screencapture (){
# Set the screenshot default path
# https://discussions.apple.com/docs/DOC-9081
mkdir -p ~/Pictures/screenshots/
cd ~/Pictures/screenshots/
defaults write com.apple.screencapture location $(pwd)
}
@miglen
miglen / keybase.md
Created Jul 23, 2018
keybase.io/miglen
View keybase.md

Keybase proof

I hereby claim:

  • I am miglen on github.
  • I am miglen (https://keybase.io/miglen) on keybase.
  • I have a public key whose fingerprint is 9128 BEF2 DBD3 B98A 9E30 BE07 F65B 52F4 9754 231B

To claim this, I am signing this object:

View .aws_bash_functions.sh
# Export AWS Credentials File
function export_aws(){
# usage: export_aws filename.csv
# default will be set to credentials.csv if not specified
file="${1:-credentials.csv}"
export AWS_ACCESS_KEY_ID=$(tail -1 ${file} | cut -d, -f 3)
export AWS_SECRET_ACCESS_KEY=$(tail -1 ${file} | cut -d, -f 4)
}
@miglen
miglen / ephemeral_tweets.py
Last active Apr 18, 2018
Ephemeral tweets - python implementation
View ephemeral_tweets.py
from datetime import datetime, timedelta
import os
import twitter
'''
Ephermal twitter tweets written in python
Inspired by bit.ly/2JXNkpI
Relies on: github.com/bear/python-twitter
Runs easily as AWS Lambda: amzn.to/2oif6Wv
You may set environment variables to control
You can’t perform that action at this time.