This will create a new software raid device for /dev/sdb
/dev/sdc
and /dev/sdd
First wipe the drives (clears out partitions, etc). Note, this is a destructive command, don't do this on any drive where you want to keep data.
<!-- Place this file in $HOME/Library/LaunchAgents --> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.omeganetserv.toggleairport</string> | |
<key>OnDemand</key> | |
<true/> | |
<key>ProgramArguments</key> |
#!/usr/bin/env python3 | |
class Three: | |
def __init__(self, value): | |
self._value = value | |
@property | |
def four(self): | |
return self._value |
#!/usr/bin/env python3 | |
data = [ | |
[1, 2, 3, 4, 5], | |
[6, 7, 8, 9, 10], | |
[11, 12, 13, 14, 15], | |
] | |
def iterate_data(): | |
for row in data: |
I hereby claim:
To claim this, I am signing this object:
(webos) abates@hawkeye:~/local/devel/webos$ python webos.py | |
2022-01-17 12:13:52 INFO (MainThread) [__main__] Setting up host variables | |
2022-01-17 12:13:52 INFO (MainThread) [sqlitedict] opening Sqlite table 'unnamed' in '/home/abates/local/devel/webos/.aiopylgtv.sqlite' | |
2022-01-17 12:13:52 INFO (MainThread) [__main__] Connecting | |
2022-01-17 12:13:54 INFO (MainThread) [__main__] Failed to connect: TimeoutError | |
2022-01-17 12:13:59 INFO (MainThread) [__main__] Connecting | |
2022-01-17 12:14:01 INFO (MainThread) [__main__] Failed to connect: TimeoutError | |
2022-01-17 12:14:06 INFO (MainThread) [__main__] Connecting | |
2022-01-17 12:14:07 INFO (MainThread) [__main__] State update {'state': 'Active'} | |
2022-01-17 12:14:07 INFO (MainThread) [__main__] Connected! |
#!/bin/bash | |
# rshark is a script that will execute tcpdump over ssh | |
# and pipe the output back to a local wireshark instance. | |
# This allows viewing of remote packet captures locally | |
# with the wireshark gui | |
# | |
# In order for this script to work, the /usr/sbin/tcpdump | |
# binary must exist on the remote host and the user | |
# running the script must have sudo access on the remote host | |
# |
#!/usr/bin/env ruby | |
1 + 1 + 1 + 1 + 1 | |
1 + 1 + 1 + 1 + 1 | |
o = 1 + 1*0 + 1 | |
puts "The result is: #{o}" | |
# Run this and you'll get: | |
# The result is: 2 |
package main | |
import ( | |
"fmt" | |
"runtime" | |
"time" | |
) | |
func main() { | |
runtime.GOMAXPROCS(2) |
For anyone who wants to hack with Go tonight, here are some installation suggestions:
Go can be installed in a few different ways. You can install using a package manager or using the Google provided binaries. I prefer to use Go Version Manager which is similar to rvm and nvm. gvm can be installed by following the instructions here
Once gvm is installed it is trivial to install different versions of Go as well as install the cross compilers.
To install Go 1.4.2 (current) simply run:
gvm install go1.4.2