jq 'map(.foo)'
[ { foo: 1 }, { foo: 2 } ]
[1, 2]
| #============================================================================= | |
| # dark_powered.toml --- dark powered configuration example for SpaceVim | |
| # Copyright (c) 2016-2017 Wang Shidong & Contributors | |
| # Author: Wang Shidong < wsdjeg at 163.com > | |
| # URL: https://spacevim.org | |
| # License: GPLv3 | |
| #============================================================================= | |
| [options] | |
| lint_on_the_fly = true |
| import Data.Char | |
| positions :: Eq a => a -> [a] -> [Int] | |
| positions x xs = [i | (x', i) <- zip xs [0..], x==x'] | |
| lowers :: String -> Int | |
| lowers xs = length [x | x <- xs, x >= 'a' && x <= 'z'] | |
| count :: Char -> String -> Int | |
| count x xs = length [x' | x' <- xs, x == x'] |
| # Key derivation functions. See: | |
| # http://docs.aws.amazon.com/general/latest/gr/signature-v4-examples.html#signature-v4-examples-python | |
| def sign(key, msg): | |
| return hmac.new(key, msg.encode('utf-8'), hashlib.sha256).digest() | |
| def getSignatureKey(key, dateStamp, regionName, serviceName): | |
| kDate = sign(('AWS4' + key).encode('utf-8'), dateStamp) | |
| kRegion = sign(kDate, regionName) | |
| kService = sign(kRegion, serviceName) |
| #!/usr/bin/env python | |
| import argparse | |
| import redis | |
| def connect_redis(conn_dict): | |
| conn = redis.StrictRedis(host=conn_dict['host'], | |
| port=conn_dict['port'], | |
| db=conn_dict['db']) | |
| return conn |
| $EC2SettingsFile="C:\\Program Files\\Amazon\\Ec2ConfigService\\Settings\\BundleConfig.xml" | |
| $xml = [xml](get-content $EC2SettingsFile) | |
| $xmlElement = $xml.get_DocumentElement() | |
| foreach ($element in $xmlElement.Property) | |
| { | |
| if ($element.Name -eq "AutoSysprep") | |
| { | |
| $element.Value="Yes" | |
| } |
| go build helloworld.go | |
| GOOS=windows GOARCH=amd64 go build helloworld.go |
Note where home is
(RaspberryPi2)root@localhost:~# df -h /home/
Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p4 1.6G 1.3G 160M 89% /oem
(RaspberryPi2)root@localhost:~# df -h
To limit a CPU to a certain C-state, you can pass the processor.max_cstate=X option in the kernel line of /boot/grub/grub.conf.
Here we limit the system to only C-State 1:
kernel /vmlinuz-2.6.18-371.1.2.el5 ... processor.max_cstate=1
On some systems, the kernel can override the BIOS setting, and the parameter intel_idle.max_cstate=0 may be required to ensure sleep states are not entered: