latest info and more instructions, please refer to the original archlinux wiki page!
- get archboot and insert it into cdrom
- network config (generally done)
- prepare the storage (using cfdisk, a boot and root partition)
- mount partitions
#!/bin/bash | |
DIR="${HOME}/images/screenshots" | |
DATE="$(date +%Y%m%d-%H%M%S)" | |
NAME="${DIR}/screenshot-${DATE}.png" | |
LOG="${DIR}/screenshots.log" | |
# Check if the dir to store the screenshots exists, else create it: | |
if [ ! -d "${DIR}" ]; then mkdir -p "${DIR}"; fi |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import urllib | |
import urllib2 | |
data = urllib2.urlencode({'foo': 'bar'}) | |
r = urllib2.Request('https://www.google.com', # url | |
data, # post data |
# -*- coding: utf-8 -*- | |
import re | |
import sys | |
with open('/proc/net/tcp') as f: | |
lineno = 0 | |
sockets = [] | |
for line in f: | |
lineno += 1 | |
if lineno == 1: |
# -*- coding: utf-8 -*- | |
import logging | |
import requests | |
LOGGER = logging.getLogger(__name__) | |
def join(*args): |
latest info and more instructions, please refer to the original archlinux wiki page!
# -*- coding: utf-8 -*- | |
class {{ table.name }}: | |
__tablename__ = '{{ table.name }}' | |
{% for col in table.columns %} | |
{{ col.name }} = Column({{col.type}}{% if col.primary_key %}, primary_key=True{% endif%}{% if not col.nullable %}, nullable=False{% endif %}) | |
{% endfor -%} |
# -*- coding: utf-8 -*- | |
from flask import Flask | |
from sqlalchemy import SQLAlchemy | |
app.config['SQLALCHEMY_DATABASE_URI'] = "mysql+oursql://foo:bar@localhost/test1" | |
# binds multiple database definition | |
app.config['SQLALCHEMY_BINDS'] = { | |
"db1": "mysql+oursql://foo:bar@localhost/test1", |
terraform apply terra-plan | |
2021/01/05 15:12:35 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility. | |
Use TF_LOG=TRACE to see Terraform's internal logs. | |
---- | |
2021/01/05 15:12:35 [INFO] Terraform version: 0.13.5 | |
2021/01/05 15:12:35 [INFO] Go runtime version: go1.15.3 | |
2021/01/05 15:12:35 [INFO] CLI args: []string{"/usr/bin/terraform", "apply", "terra-plan"} | |
2021/01/05 15:12:35 [DEBUG] Attempting to open CLI config file: /home/momoka/.terraformrc | |
2021/01/05 15:12:35 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
2021/01/05 15:12:35 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins |
; | |
( | |
function () { | |
'use strict' | |
var root = this | |
var b64 | |
if (typeof exports !== 'undefined') { |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
) |