- List domains: #virsh list --all
- Undefine domains: #virst undefine <domain-name>
- List all volumes in pool 'default': #virsh vol-list default
''' | |
Basic tail command implementation | |
Usage: | |
tail.py filename numlines | |
''' | |
import sys | |
import linecache |
I wanted to be really able to explain to a fair amount of detail how does the program ls
actually work right from the moment you type the command name and hit ENTER. What goes on in user space and and in kernel space? This is my attempt and what I have learned so far on Linux (Fedora 19, 3.x kernel).
How does the shell find the location of 'ls' ?
function Get-DynamoByPrefix($table, $keyPrefix) | |
{ | |
$region = "ap-southeast-2" | |
$regionEndpoint=[Amazon.RegionEndPoint]::GetBySystemName($region) | |
$client = New-Object Amazon.DynamoDBv2.AmazonDynamoDBClient($regionEndpoint) | |
$req = New-Object Amazon.DynamoDBv2.Model.ScanRequest | |
$req.TableName = $table | |
$result = $client.Scan($req) | |
$result.Items | Where-Object {$_.Key.S.StartsWith($keyPrefix)} | ForEach-Object { |
# blog post: https://echorand.me/nginx-and-geoip2.html | |
worker_processes auto; | |
daemon off; | |
error_log /dev/stdout warn; | |
include /etc/nginx/modules/*.conf; | |
load_module modules/ngx_http_geoip2_module.so; | |
events { | |
} |
# Copyright 2008 Lowell Alleman | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may not | |
# use this file except in compliance with the License. You may obtain a copy | |
# of the License at http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |
# License for the specific language governing permissions and limitations |
''' Demo script experimenting with various features of the | |
inspect module | |
''' | |
# To be run with Python3.3 | |
from inspect_test import MyClass | |
from inspect_test import myfunc | |
from inspect_test import mygen |
/* Invokes a published function in PiCloud and then | |
retrieves the results. | |
Uses libcurl. Compile using the -lcurl flag. | |
See: http://echorand.me/2012/01/27/picloud-and-rest-api-with-c-client/ | |
*/ | |
#include <stdio.h> | |
#include <curl/curl.h> | |
#include <string.h> |
''' Dumps a config file of the type readable by ConfigParser | |
into a dictionary | |
Ref: http://docs.python.org/library/configparser.html | |
''' | |
import sys | |
import ConfigParser | |
class GetDict: | |
From my understanding, a transaction corresponds to a single micropip.install()
command.
The method add_requirement_inner()
gets called for each package that we will be installing as
part of the current microppip transaction.
So, consider the following:
pkga
with optional dependency marker, all
which will bring in packages, depa
and depb