@triggerBody().fileName
@triggerBody().folderPath
This file contains 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
{ | |
"$schema": "https://vega.github.io/schema/vega/v5.json", | |
"width": 200, | |
"title": { | |
"text": "Macro Targets", | |
"align": "left", | |
"anchor": "start", | |
"subtitle": { | |
"signal": "['1. Enter your calorie target below ('+min_calories_allowed+'kcal - '+max_calories_allowed+'kcal)', '2. Click and drag the bars below to determine your macro targets (g)', empty_character, '1g fat = 9 kcal', '1g carbohydrates = 4 kcal', '1g protein = 4 kcal', empty_character]" | |
} |
This file contains 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
nmcli -t -f active,ssid dev wifi | egrep '^yes:' | sed 's/^yes://' | |
sudo nmcli -s -g 802-11-wireless-security.psk connection show 'HITRON-F7F0' |
This file contains 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 os | |
import pickle | |
from google.auth.transport.requests import Request # pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib | |
from google_auth_oauthlib.flow import InstalledAppFlow | |
from googleapiclient.discovery import build | |
from django.db import models | |
from django.conf import settings | |
# Create your models here. | |
class Greeting(models.Model): |
This file contains 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
virtualenv venv | |
source venv/bin/activate | |
pip install django | |
django-admin startproject mysite | |
django-admin startapp polls | |
pyhton manage.py migrate # applies migrations on database | |
python manage.py createsuperuser # create a super user in database | |
./manage.py makemigrations polls # creates migration for polls app | |
./manage.py sqlmigrate polls 0001 # shows sql command that will be generated by migrate command |
This file contains 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
# Create a new skill project from the built-in Hello World sample | |
ask new ; | |
# Deploy a skill to developer account | |
ask deploy ; | |
# Create a local skill project directory from the development stage of an existing skill | |
# (note: get skill id at Alexa Developer Console) | |
# (note 2: will download the skill manifest, interaction model and skill code from AWS Lambda) | |
ask clone --skill-id amzn1.ask.skill.714b7ee8-85cb-4b18-8ce6-3bdeaa03bd48 ; | |
# Test a skill on device | |
ask simulate --text "open nursing skill" --locale en-us |
This file contains 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
Get-MsolAccountSku | |
(Get-MsolAccountSku | where {$_.AccountSkuId -eq "reseller-account:O365_BUSINESS_PREMIUM"}).ServiceStatus |
This file contains 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
# Change the permission of .pem certificate so only the root user can read it | |
chmod 400 LightsailDefaultPrivateKey-us-east-1.pem ; | |
cp LightsailDefaultPrivateKey-us-east-1.pem ~/.ssh ; | |
# Connect to LigthSail via SSH | |
ssh -i ~/.ssh/LightsailDefaultPrivateKey-us-east-1.pem bitnami@34.200.244.131 ; | |
# Send file LightSail via SCP | |
scp -i ~/.ssh/LightsailDefaultPrivateKey-us-east-1.pem backup-9.5.2018_09-40-41_gaiapole.tar.gz bitnami@34.200.244.131:~ ; |
This file contains 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
git checkout -b myfeature develop #Switched to a new branch "myfeature" |
This file contains 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
from string import punctuation, ascii_letters, digits | |
import random | |
def generate_password(pass_length): | |
symbols = ascii_letters + digits + punctuation | |
secure_random = random.SystemRandom() | |
password = "".join(secure_random.choice(symbols) for i in range(pass_length)) | |
return password | |
generate_password(15) |
NewerOlder