Skip to content

Instantly share code, notes, and snippets.

View ramanqul's full-sized avatar

Raman Buzaubakov ramanqul

View GitHub Profile
@ramanqul
ramanqul / README.md
Created December 6, 2017 21:13 — forked from leonardofed/README.md
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.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


@ramanqul
ramanqul / nginx_api.conf
Last active November 30, 2017 11:48
nginx CORS configuration for backend api
upstream api_hosts {
server 127.0.0.1:59000;
}
server {
listen 80;
location / {
root /opt/ui/ui-dist;
if ($request_method = OPTIONS) {
# Handle OPTIONS method
add_header Content-Length 0;
add_header Content-Type text/plain;
return 204;
}
# Headers get added no matter the request method
more_set_headers "Access-Control-Allow-Credentials: true";
more_set_headers "Access-Control-Allow-Methods: GET, POST, PUT, DELETE";
@ramanqul
ramanqul / nginx.conf
Created November 20, 2017 10:07 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@ramanqul
ramanqul / vim_info.md
Created December 31, 2015 09:28 — forked from todgru/vim_info.md
vim nerdtree copy paste search and replace

#vim

Editing

  • shift V select line, up or down select lines
  • shift > shift select block or line out
  • shift < shift select block or line in
  • d to delete highlighted text and copy to cliboard
  • D delete everything after cursor to end of line
  • y to copy (yank)
@ramanqul
ramanqul / extract-attachments.py
Created December 14, 2015 07:37 — forked from stefansundin/extract-attachments.py
Extract attachments from emails that Gmail doesn't allow you to download. This is dumb. (Only tested with Python 3.4)
# Get your files that Gmail block. Warning message:
# "Anti-virus warning - 1 attachment contains a virus or blocked file. Downloading this attachment is disabled."
# Based on: http://spapas.github.io/2014/10/23/retrieve-gmail-blocked-attachments/
# Go to your emails, click the arrow button in the top right, "Show original", save to the same directory as this script.
import email
import sys
import os
if __name__ == '__main__':
@ramanqul
ramanqul / cyrillic2latin_file_renamer.py
Created March 14, 2015 20:42
Cyrillic to Latin File Changer
#!/usr/bin/python
# -*- coding: utf-8 -*-
from os import walk, rename, unlink, mkdir, remove
from os.path import isdir, exists
from sys import argv, exit, getfilesystemencoding
from shutil import copyfile
import shutil
conversion = {