ipmitool -I lanplus -H <iDRAC-IP> -U <iDRAC-USER> -P <iDRAC-PASSWORD> sensor reading "Ambient Temp" "FAN 1 RPM" "FAN 2 RPM" "FAN 3 RPM"
| #!/bin/bash | |
| set -eu | |
| _UID=$(id -u) | |
| GID=$(id -g) | |
| # give lxd permission to map your user/group id through | |
| grep root:$_UID:1 /etc/subuid -qs || sudo usermod --add-subuids ${_UID}-${_UID} --add-subgids ${GID}-${GID} root | |
| # set up a separate key to make sure we can log in automatically via ssh | |
| # with $HOME mounted |
| package com.example.anothersignintest; | |
| import com.google.android.gms.auth.api.Auth; | |
| import com.google.android.gms.auth.api.signin.GoogleSignInAccount; | |
| import com.google.android.gms.auth.api.signin.GoogleSignInOptions; | |
| import com.google.android.gms.auth.api.signin.GoogleSignInResult; | |
| import com.google.android.gms.common.ConnectionResult; | |
| import com.google.android.gms.common.api.GoogleApiClient; | |
| import com.google.android.gms.common.api.OptionalPendingResult; | |
| import com.google.android.gms.common.api.ResultCallback; |
| func urlencode(s string) (result string){ | |
| for _, c := range(s) { | |
| if c <= 0x7f { // single byte | |
| result += fmt.Sprintf("%%%X", c) | |
| } else if c > 0x1fffff {// quaternary byte | |
| result += fmt.Sprintf("%%%X%%%X%%%X%%%X", | |
| 0xf0 + ((c & 0x1c0000) >> 18), | |
| 0x80 + ((c & 0x3f000) >> 12), | |
| 0x80 + ((c & 0xfc0) >> 6), | |
| 0x80 + (c & 0x3f), |
| package com.example.mac2vendortest; | |
| import android.os.Bundle; | |
| import android.app.Activity; | |
| import android.content.BroadcastReceiver; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.content.IntentFilter; | |
| import android.widget.TextView; |
This gist assumes:
The following describes the mandatory requirements that must be adhered to for autoloader interoperability.
\ <Vendor Name> \ (<Namespace>)* \ <Class Name>DIRECTORY_SEPARATOR when loading from the file system.DIRECTORY_SEPARATOR. The "_" character has no special meaning in the namespace.| <?php | |
| // secure hashing of passwords using bcrypt, needs PHP 5.3+ | |
| // see http://codahale.com/how-to-safely-store-a-password/ | |
| // salt for bcrypt needs to be 22 base64 characters (but just [./0-9A-Za-z]), see http://php.net/crypt | |
| $salt = substr(strtr(base64_encode(openssl_random_pseudo_bytes(22)), '+', '.'), 0, 22); | |
| // 2y is the bcrypt algorithm selector, see http://php.net/crypt | |
| // 12 is the workload factor (around 300ms on my Core i7 machine), see http://php.net/crypt |