View gist:689258d4499d3aeb7ed174fdfc8d9521
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
volume=70 | |
speakers="192.168.2.103 192.168.2.60" | |
for host in $speakers; do | |
echo $host | |
# enable optical direct mode | |
curl -s http://$host/opticaldirect/enabled -XPOST | |
# name must be Left or Right | |
curl -s http://$host/device/name | jq . | |
role=$(curl -s http://$host/device/name | jq -r .data.name) | |
curl -s http://$host/opticaldirect/role -d "{\"role\":\"Front$role\"}" -H "Content-Type: application/json" |
View phoenix_live_view_example-devfile.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
metadata: | |
name: phoenix_live_view_example | |
projects: | |
- name: phoenix_live_view_example | |
source: | |
location: 'https://github.com/chrismccord/phoenix_live_view_example.git' | |
type: git | |
branch: master | |
components: | |
- mountSources: true |
View devfile.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: 1.0.0 | |
metadata: | |
name: terraform-provider-k8s | |
projects: | |
- name: terraform-provider-k8s | |
source: | |
location: 'https://github.com/mingfang/terraform-provider-k8s.git' | |
type: git | |
clonePath: src/github.com/mingfang/terraform-provider-k8s/ | |
- name: terraform-k8s-modules |
View shell.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"flag" | |
"os" | |
"os/exec" | |
"go.uber.org/cadence/.gen/go/cadence/workflowserviceclient" | |
"go.uber.org/cadence/activity" |
View Alluxio.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View screensaver.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while true | |
do | |
if ping -c 1 -w 3 192.168.2.67 &> /dev/null || hcitool scan | grep -q -E "ming-macbook|Ming's iPhone" ; then | |
echo "welcome back. turning screen on" | |
echo 0 | sudo tee /sys/class/backlight/rpi_backlight/bl_power | |
else | |
echo "you're gone. turning screen off" | |
echo 1 | sudo tee /sys/class/backlight/rpi_backlight/bl_power |
View pgcalc.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Computes the suggested PG count similar to this http://ceph.com/pgcalc/ | |
#Reguirements: | |
# - must run on ceph admin | |
# - depends on awk, wc and bc commands | |
#Limitations: | |
# - Assumes same OSD# for all pools |
View gulpfile.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// DO NOT CHANGE // | |
const gulp = require('gulp'); | |
const webpack = require('webpack'); | |
const WebpackDevServer = require('webpack-dev-server'); | |
const gwebpack = require('webpack-stream'); | |
const browserSync = require('browser-sync'); | |
const runSequence = require('run-sequence'); | |
const debug = require('gulp-debug'); | |
const cache = require('gulp-cached'); |
View show vm ip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
virt-cat -d vm1 /var/lib/dhcp/dhclient.eth0.leases |
View gist:dcc5203c78775b9f4f8f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL |
NewerOlder