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
# Ansible Playbook | |
# | |
# This will create a new Django project with a single app; and will add files and set | |
# stuff up to demonstrate a Template, a Model, a Migration, and Url includes. | |
# | |
# you must have django-admin in your PATH, probably via virtualenv, to make this work | |
# | |
# By Steve Molin. GPL. | |
--- | |
- hosts: all |
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
In /etc/smartd.conf, add a line like this before the line with DEVICESCAN in it: | |
/dev/sda -m your_email@domain.com -M test | |
The "-M test" says to send an email when smartd starts (in order to test the | |
email channel). |
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
These instructions will allow root to send email from the | |
system through a dedicated gmail account, as for example for | |
smartd monitoring. | |
Props to https://tecadmin.net/send-email-smtp-server-linux-command-line-ssmtp/ | |
for the starting point for this information. | |
Sign up for a dedicated gmail account. | |
Turn on "allow less secure apps". |
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
# Hello World | |
public class YourName { | |
public static void main(String[] args) { | |
System.out.println("Hello World"); | |
} | |
} | |
# Fundamental data types and examples | |
int 99 boolean true char 'a' |
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
# props to codecademy.org for great interactive intro to SQL | |
# CREATE | |
CREATE TABLE mytable... | |
CREATE TABLE mytable(id INTEGER PRIMARY KEY, name TEXT); | |
# a "foreign key" is a reference to a "primary key" in another table | |
# INSERT | |
INSERT INTO mytable ... |
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
# constants | |
MYCONSTANT = 123 | |
# strings | |
myString = 'a b c' | |
myString = "a b c #{expression}' | |
# lists | |
myList = [1,2,3,4,5] | |
# some methods of list: |
NewerOlder