its based on arrays embedded in arrays
[
"hello world"
]this program is just a string that says hello world. it is now at location [0]
| #!/usr/bin/env python3 | |
| # Download your data dump and place this file in the "messages" folder of your data dump. | |
| # Run it using python | |
| from datetime import datetime, timedelta, timezone | |
| import dateutil.parser | |
| import matplotlib.pyplot as plt | |
| import matplotlib.ticker as ticker | |
| import matplotlib.dates as mdates | |
| import csv |
| blueprint: | |
| name: Match Outside Colour Temperature Kelvin | |
| description: When a light turns on or the sun elevation changes, match the outside | |
| colour temperature. It will apply to any bulb that supports color temperature. | |
| It triggers; whenever a bulb turns on, on sun elevation changes and every 5 minutes. | |
| domain: automation | |
| input: | |
| target_lights: | |
| name: Lights | |
| description: The primary lights to be controlled |
| package main | |
| import ( | |
| "github.com/bwmarrin/discordgo" | |
| "flag" | |
| log "github.com/Sirupsen/logrus" | |
| "fmt" | |
| "time" | |
| "errors" | |
| ) |
| func ip2int(ip net.IP) uint32 { | |
| if len(ip) == 16 { | |
| return binary.BigEndian.Uint32(ip[12:16]) | |
| } | |
| return binary.BigEndian.Uint32(ip) | |
| } | |
| func int2ip(nn uint32) net.IP { | |
| ip := make(net.IP, 4) | |
| binary.BigEndian.PutUint32(ip, nn) |
| function getUserId(fbid) { | |
| return fbid.split(':')[1]; | |
| } | |
| requireLazy( | |
| ['MercuryTypingReceiver', 'MercuryThreads', 'ShortProfiles'], | |
| (MercuryTypingReceiver, MercuryThreads, ShortProfiles) => { | |
| MercuryTypingReceiver | |
| .get() |
| NAME=$(hostname -f) | |
| TIMESTAMP=$(date +%s) | |
| echo Starting backup on $NAME | |
| mkdir -p ~/backuptmp/ | |
| echo Getting iptables... | |
| iptables-save >~/backuptmp/iptables |
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import base64 | |
| MESSAGE = ''' | |
| EUYQGhMMSx0cU0FIU1MCFAQPG01NQ0gTAEICChUGBxZTRVxBSQoZFQYKHQpKSUNURhcVEgoUFR1I | |
| SltDSBkBTRwKEAgQHxFCSkFJDgkJCgoGCkMLAQBGUklUQhMPAgAJCgYLV0MOSR0VAxAaABZBQVRP | |
| TRICCRVIAk5IEg4dVFRfRkYZBgRARBI= | |
| ''' |
| #!/usr/bin/env zsh | |
| # Initialize VPN | |
| sudo vpnns up | |
| sudo vpnns start_vpn | |
| # Popcorn time! | |
| sudo ip netns exec frootvpn sudo -u $USER popcorntime | |
| # Cleanup |