Skip to content

Instantly share code, notes, and snippets.

@StyleT
StyleT / index.md
Last active August 12, 2019 13:29
Web Components technologies support
@StyleT
StyleT / keybase.md
Created February 22, 2018 13:57
keybase.md

Keybase proof

I hereby claim:

  • I am StyleT on github.
  • I am vladfedosov (https://keybase.io/vladfedosov) on keybase.
  • I have a public key whose fingerprint is B5F6 ED39 D1A2 F55A 531B ECD7 698C 3A90 9B25 F3C6

To claim this, I am signing this object:

@StyleT
StyleT / aws_mfa.sh
Last active December 2, 2017 09:40
Retrieves a set of temporary MFA-signed credentials for an AWS account or IAM user.
#!/usr/bin/env bash
# Retrieves a set of temporary MFA-signed credentials for an AWS account or IAM user.
#
# To use it you should save MFA ARN to the profile config:
# aws configure set mfa_serial_number <ARN_OF_MFA> [--profile disco]
#
# Once the temp token is obtained, profile with "_mfa" postfix will be created
# Example: ./aws_mfa.sh disco 345324 - profile "disco_mfa" will be created with obtained creds
AWS_CLI=`which aws`
@StyleT
StyleT / sendmail.php
Created February 16, 2014 11:26
Sendmail handler (PHP edition)
<?php
/**
* Script save all letters from PHP mail function to mailFolder
* Usage: in php.ini - sendmail_path = php -f /path/to/sendmail.php
*/
//Folder for saving files
define('DIR','/Users/StyleT/sendmail/');
//получаем из потока тело письма
@StyleT
StyleT / sendmail.sh
Created February 16, 2014 11:21
Sendmail handler (SH edition)
#!/bin/sh
# Script save all letters from PHP mail function to mailFolder
# Usage: in php.ini - sendmail_path = /path/to/sendmail.sh
# TODO: detect curr folder and save files to it
mailFolder="/Users/StyleT/sendmail"
now=$(date +"%m-%d-%Y_%H-%M-%S")
num=0
@StyleT
StyleT / lostfilmparser.sh
Created February 16, 2014 11:16
LostFilm.tv downloader (Mac OS X edition)
#!/bin/bash
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
#Get current directory and 'cd' to it
BASEDIR=$(dirname $0)
cd "$BASEDIR"
#LostFilm.tv
ua="Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.9 Safari/534.30"
lfrss="http://www.lostfilm.tv/rssdd.xml"