Create a brand new ed25519 key pair
ssh-keygen -o -a 100 -t ed25519
Get the pub key and put the result in your lxd default profile
cat ~/.ssh/ed25519.pub
lxc profile edit default
| smtp mail sending in cPython blocks the GIL. | |
| This code is tested on python 2.7.8 and I'm using it with web2py | |
| If you use Google Apps for your domain email and if you have admin access, you can easily use the gmail api. | |
| Because you have admin access, you can create a "service account" in the Google Developer Console. | |
| This makes authentication easy. | |
| There are other authorisation methods when you don't have admin access, but they require interaction from the user via a browser. | |
| To use this, you need to install these modules (From PyPI): | |
| pyOpenSSL |
| from scrapy import Spider, Item, Field | |
| from twisted.internet import defer, reactor | |
| class MyItem(Item): | |
| url = Field() | |
| class MySpider(Spider): |
| [ | |
| { | |
| "city": "New York", | |
| "growth_from_2000_to_2013": "4.8%", | |
| "latitude": 40.7127837, | |
| "longitude": -74.0059413, | |
| "population": "8405837", | |
| "rank": "1", | |
| "state": "New York" | |
| }, |
| import copy | |
| from scrapy import Item | |
| class ModelItem(Item): | |
| """ | |
| Make Peewee models easily turn into Scrapy Items. | |
| >>> from models import Player | |
| >>> item = ModelItem(Player()) | |
| """ |
Create a brand new ed25519 key pair
ssh-keygen -o -a 100 -t ed25519
Get the pub key and put the result in your lxd default profile
cat ~/.ssh/ed25519.pub
lxc profile edit default
| #!/bin/bash | |
| # Put all the domain names in domains.txt, one per line | |
| # then run in the terminal: bash domains.sh | |
| # this will print each domain in the terminal as it looks it up | |
| # The result csv will contains the domain, IP & Nameservers in each column | |
| # Give each column the relevant header titles | |
| echo "Domain Name,IP Address" > dig_cloud-bleed_domains.csv | |
| while read domain |
| from lightify import Lightify | |
| lightify = Lightify('192.168.1.10') | |
| lightify.update_all_light_status() | |
| lights = lightify.lights() | |
| ls = {light.name(): light for light in lights.values()} | |
| def rainbow(): | |
| r, g, b = 255, 0, 0 | |
| for g in range(256): | |
| yield r, g, b |
| default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
| default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
| default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
| #!/bin/bash | |
| # Software License Agreement (BSD) | |
| # | |
| # Author Mike Purvis <[email protected]> | |
| # Corrected by Fuzzy Logic Robotics, Inc., All rights reserved. | |
| # Copyright (c) 2014-2016, Clearpath Robotics, Inc., All rights reserved. | |
| # | |
| # Redistribution and use in source and binary forms, with or without modification, are permitted provided that | |
| # the following conditions are met: | |
| # * Redistributions of source code must retain the above copyright notice, this list of conditions and the |