start new:
tmux
start new with session name:
tmux new -s myname
| #!/bin/bash | |
| # call this script with an email address (valid or not). | |
| # like: | |
| # ./makecert.sh joe@random.com | |
| mkdir certs | |
| rm certs/* | |
| echo "make server cert" | |
| openssl req -new -nodes -x509 -out certs/server.pem -keyout certs/server.key -days 3650 -subj "/C=DE/ST=NRW/L=Earth/O=Random Company/OU=IT/CN=www.random.com/emailAddress=$1" | |
| echo "make client cert" | |
| openssl req -new -nodes -x509 -out certs/client.pem -keyout certs/client.key -days 3650 -subj "/C=DE/ST=NRW/L=Earth/O=Random Company/OU=IT/CN=www.random.com/emailAddress=$1" |
| // Convert a struct sockaddr address to a string, IPv4 and IPv6: | |
| char *get_ip_str(const struct sockaddr *sa, char *s, size_t maxlen) | |
| { | |
| switch(sa->sa_family) { | |
| case AF_INET: | |
| inet_ntop(AF_INET, &(((struct sockaddr_in *)sa)->sin_addr), | |
| s, maxlen); | |
| break; |
| # use the latest ubuntu environment (18.04) available on travis | |
| dist: xenial | |
| language: go | |
| # Force-enable Go modules. Also force go to use the code in vendor/ | |
| # These will both be unnecessary when Go 1.13 lands. | |
| env: | |
| - GO111MODULE=on | |
| - GOFLAGS='-mod vendor' |
| #!/usr/bin/env python3 | |
| """ | |
| Get reading from Nova PM Sensor SDS011 | |
| (dust sensor, air quality sensor, PM10, PM2,5) | |
| Designed to run from cron and append CSV file. | |
| Script tested using Python3.4 on Ubuntu 14.04. |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| /* | |
| * MCrypt API available online: | |
| * http://linux.die.net/man/3/mcrypt | |
| */ | |
| #include <mcrypt.h> |
| { | |
| {I have|I've} been {surfing|browsing} online more than {three|3|2|4} hours today, yet I never found any interesting article like yours. {It's|It | |
| is} pretty worth enough for me. {In my opinion|Personally|In my view}, if all {webmasters|site owners|website owners|web owners} and bloggers made good content as | |
| you did, the {internet|net|web} will be {much more|a lot more} | |
| useful than ever before.| | |
| I {couldn't|could not} {resist|refrain from} commenting. {Very well|Perfectly|Well|Exceptionally well} written!| | |
| {I will|I'll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch} | |
| your {rss|rss feed} as I {can not|can't} {in finding|find|to find} your {email|e-mail} subscription {link|hyperlink} or {newsletter|e-newsletter} service. Do {you have|you've} any? | |
| {Please|Kindly} {allow|permit|let} me {realize|recognize|understand|recognise|know} {so that|in order that} I {may just|may|could} subscribe. | |
| Thanks.| |