Skip to content

Instantly share code, notes, and snippets.

@alcir
alcir / snapshotzfs.sh
Created July 9, 2017 05:12
Sample backup script using ZFS snapshot
#!/bin/bash
SCRIPTPATH=$(cd "$(dirname "$0")" && pwd)
ZFSFILESYSTEM=zpool_tank/my_backups
ZFSMOUNTPOINT=/zpool_tank/my_backups
TODAY=`date +%Y%m%d`
YESTERDAY=`date --date="1 days ago" +%Y%m%d`
ERROR=0
@alcir
alcir / config.log
Created March 11, 2015 13:50
watchman config.log smartos
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by watchman configure 3.0.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
[root@myserver ~]# ps -ef|grep zoneadm
root 3923 1 0 15:23:20 ? 0:02 zoneadmd -z 17399352-d471-4adc-9997-6bc07dc1e147
root 13706 13185 0 09:18:28 pts/6 0:00 grep zoneadm
root 12926 12921 0 08:24:47 pts/1 0:00 /usr/sbin/zoneadm -u 17399352-d471-4adc-9997-6bc07dc1e147 halt -X
[root@myserver ~]# mdb -k
Loading modules: [ unix genunix specfs dtrace mac cpu.generic uppc apix scsi_vhci ufs ip hook neti sockfs arp usba stmf_sbd stmf zfs lofs idm sata crypto random cpc logindmux ptm kvm sppp nsmb smbsrv nfs sd mr_sas ipc ]
> ::wchaninfo -v !grep zoneadmd
ffffff53c18574d8 cond 1: ffffff53bea60c40 zoneadmd
ffffff53be9c0e0e cond 1: ffffff53be9c0c20 zoneadmd
fffffffffbcf128c cond 1: ffffff53be9c0140 zoneadmd
#!/bin/bash
TWIDDLEPATH=/export/dcm4chee/bin/twiddle.sh
TWUSER=admin
TWPASS=password
TWHOST=127.0.0.1
INPUTFILE=/tmp/queryresult.txt
@alcir
alcir / leofs SmartOS
Last active August 29, 2015 13:58
leofs SmartOS
3 zones created
zoneA 192.168.0.136
zoneB 192.168.0.136
zoneC 192.168.0.136
In each zone I've configured the fifo repository, then I have installed:
@alcir
alcir / gist:9784961
Created March 26, 2014 14:44
ntp.conf
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
# Ascolta solo qui e non su tutte le interfacce
interface listen 192.168.0.1
interface listen 192.168.1.1
# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/
@alcir
alcir / vlm
Created February 3, 2014 11:36
vlc
new channel1 broadcast enabled
setup channel1 input "rtsp://192.168.29.100:554/axis-media/media.amp"
#setup channel1 output #http{mux=ts,dst=:8090/live1}
#setup channel1 output #rtp{mux=ts,dst=,port=5004,sdp=sap://,name="Channel 2"}
#setup channel1 output #rtp{access=udp,mux=ts,dst=224.255.1.1,port=1234,sdp=sap,sap,group="Video",name="2007 Movie"}
#setup channel1 output #rtp{sdp=rtsp://0.0.0.0:8080/test100.sdp}
setup channel1 output #rtp{sdp=rtsp://0.0.0.0:8080/test100.sdp,mux=ts{crypt-video,crypt-audio,csa-ck=1234}}
new channel2 broadcast enabled
setup channel2 input "rtsp://192.168.29.101:554/axis-media/media.amp"
@alcir
alcir / MP84S4
Created January 29, 2014 08:56
Mediacom MP84S4
Realtek 8723AU USB WiFi driver (Powered by Rockchip,Ver 2.00.WFD)
sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config; svcadm restart ssh
@alcir
alcir / a
Created August 30, 2013 14:53
a
a