This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| from selenium import webdriver | |
| # from urlparse import urlparse | |
| # from urlparse import parse_qs | |
| from selenium.webdriver.support.ui import WebDriverWait | |
| # from selenium.common.exceptions import NoSuchElementException | |
| # from selenium.webdriver.common.action_chains import ActionChains | |
| from selenium.webdriver.support import expected_conditions as EC | |
| from selenium.webdriver.common.by import By | |
| # from selenium.webdriver.common.keys import Keys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Original Author https://raw.githubusercontent.com/kgoedecke/python-ecs-example/master/python_ecs_example/deployment.py | |
| import boto3 | |
| import pprint | |
| import os | |
| # Credentials & Region | |
| access_key = os.environ["AWS_ACCESS_KEY_ID"] | |
| secret_key = os.environ["AWS_SECRET_ACCESS_KEY"] | |
| region = "us-east-1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.time.format.DateTimeFormatter; | |
| import java.time.Instant; | |
| import java.time.ZonedDateTime; | |
| import java.time.ZoneId; | |
| import java.time.ZoneOffset; | |
| Instant.now(); | |
| // java.time.Instant = 2015-08-13T09:28:27.141Z | |
| DateTimeFormatter.ISO_INSTANT.format(Instant.now()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Restify Server CheatSheet. | |
| // More about the API: http://mcavage.me/node-restify/#server-api | |
| // Install restify with npm install restify | |
| // 1.1. Creating a Server. | |
| // http://mcavage.me/node-restify/#Creating-a-Server | |
| var restify = require('restify'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| namespace RsaKeyConverter.Converter | |
| { | |
| public static class BytesExtensions | |
| { | |
| public static string ToBase64(this byte[] bytes) | |
| { | |
| return Convert.ToBase64String(bytes); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CentOS startup script for the nginx | |
| * nginx installed /usr/local/nginx/ directory | |
| $ sudo mv /path/to/nginxd /etc/init.d/nginxd | |
| $ cd nginxd | |
| $ chmod +x nginxd | |
| $ chkconfig nginxd on | |
| $ chkconfig --list nginxd |