Clear packing tape. Apply single layer everywhere on back panel there isn't a device port. Be creative.
Has worked for me for months to prevent further damage.
Cost less than $ 0.01.
Doesn't look "pro" but neither do $20 - $30 covers from Toys-R-Us and other similar stores.
I actually only covered the area below the camera and to the left of the speak/microphone/whatever with one single piece I had to cut a bit to size.
Tuesday, 5 May 2015
Tuesday, 27 January 2015
Cassandra: links to snapshots in one place
Use rsync with '-L' to copy elsewhere.
#!/usr/bin/ruby
require 'fileutils'
mybasedir = '/var/lib/cass'
mydatadir = mybasedir + '/data'
mysnapshotlinksdir = mybasedir + '/snapshots'
FileUtils.remove_dir(mysnapshotlinksdir) if File.exists?(mysnapshotlinksdir)
Dir.chdir mydatadir
mysnapshotdirs = Dir.glob("**/*/")
mysnapshotdirs = mysnapshotdirs.grep(/snapshots\/.+/)
#p mysnapshotdirs
mysnapshots = {}
mysnapshotdirs.each do |mydir|
mysnapshot = {}
myparts = mydir.split('/')
mysnapshot['keyspace'] = myparts[0]
mysnapshot['cf'] = myparts[1]
mysnapshot['tag'] = myparts[3]
mysnapshot['linkdir'] = [mysnapshotlinksdir, mysnapshot['tag'], mysnapshot['keyspace']].join('/')
mysnapshot['link'] = [mysnapshotlinksdir, mysnapshot['tag'], mysnapshot['keyspace'], mysnapshot['cf']].join('/')
mysnapshot['target'] = [mydatadir, mydir].join('/')
#p mysnapshot
FileUtils.mkpath mysnapshot['linkdir'] unless File.exists?(mysnapshot['linkdir'])
File.symlink(mysnapshot['target'], mysnapshot['link']) unless File.symlink?(mysnapshot['link'])
end
Saturday, 11 October 2014
Encrypt one directory with password, reboots hide files
See: encfs
Plenty of guides online.
Plenty of guides online.
Labels:
directory,
encfs,
encrypt,
filesystem,
hide,
key,
lost,
password,
passworded,
reboot
Friday, 19 September 2014
Mount read-only a Linux ext3/ext4 partition from within Mac OS
http://diesistmein.name/?p=30
or some variation.
Might help: http://osxdaily.com/2014/03/20/mount-ext-linux-file-system-mac/
Friday, 15 August 2014
OpenVPN version 2.3.2: using new easyrsa mechanism for multiple users
- Server setup
- ./easyrsa init-pki
- don't do this twice!
- ./easyrsa build-ca
- User key and cert signing request on complete separate machine
- ./easyrsa init-pki
- don't do this twice!
- ./easyrsa gen-req myuser
- Server signs user cert req
- ./easyrsa import-req myuser.req myuser
- ./easyrsa sign-req client myuser
Any client with a signed cert may connect to the server. There is no record of the client cert on the server itself; since the server signed the user cert, that is authority enough to validate the user cert.
Only if a user cert needs to be revoked, is a "revocation file" created on the server; this revocation file disallows that user from connecting. If no users need to be revoked, nothing needs to be done, nothing needs to exist about users on the server-side.
https://community.openvpn.net/openvpn/wiki/EasyRSA3-OpenVPN-Howto
Wednesday, 6 August 2014
Very fast editing over sshfs
Update: this can cause some of your ssh sessions to hang, so be aware of that.
Add this to your ~/.ssh/config
Host myserver.mydomain.com
ControlMaster auto
ControlPath /tmp/%r@%h:%p
Then, say you have root access via your ssh pub key
mkdir tmp001
sshfs -o uid=1000 root@myserver.mydomain.com:/var/www tmp001
Now, the files in tmp001 map to your remote /var/www directory. And access to them uses an ssh session that is maintained in your /tmp directory, i.e. all interactions are performed over the same ssh session.
To see the tmp file, if you just opened the sshfs session in the last 10 mins
find /tmp -mmin -10 -ls
Add this to your ~/.ssh/config
Host myserver.mydomain.com
ControlMaster auto
ControlPath /tmp/%r@%h:%p
Then, say you have root access via your ssh pub key
mkdir tmp001
sshfs -o uid=1000 root@myserver.mydomain.com:/var/www tmp001
Now, the files in tmp001 map to your remote /var/www directory. And access to them uses an ssh session that is maintained in your /tmp directory, i.e. all interactions are performed over the same ssh session.
To see the tmp file, if you just opened the sshfs session in the last 10 mins
find /tmp -mmin -10 -ls
Friday, 1 August 2014
AWS cli: rework EBS volume on AMI launch: switch to SSD, "delete on termination" to true
aws
ec2
run-instances
--image-id
ami-aaaaaa
--instance-type
hi1.4xlarge
--security-group-ids
sg-eeeeeeee
--subnet-id
subnet-cccccccc
--block-device-mappings
'[
{
"DeviceName":"/dev/sdb",
"VirtualName":"ephemeral0"
},
{
"DeviceName":"/dev/sdc",
"VirtualName":"ephemeral1"
},
{
"DeviceName":"/dev/sdd",
"Ebs":
{
"SnapshotId":"snap-6",
"VolumeType":"gp2",
"DeleteOnTermination":"true"
}
}
]'
--region
us-east-1
Switch to high IOPS
aws
ec2
run-instances
--image-id
ami-aaaaaa
--instance-type
hi1.4xlarge
--security-group-ids
sg-eeeeeeee
--subnet-id
subnet-cccccccc
--block-device-mappings
'[
{
"DeviceName":"/dev/sdb",
"VirtualName":"ephemeral0"
},
{
"DeviceName":"/dev/sdc",
"VirtualName":"ephemeral1"
},
{
"DeviceName":"/dev/sdd",
"Ebs":
{
"SnapshotId":"snap-6",
"VolumeType":"io1",
"Iops":4000,
"DeleteOnTermination":"true"
}
}
]'
--region
us-east-1
Labels:
alter,
ami,
aws,
delete,
ec2,
existing,
run-instances,
snapshot,
termination,
volume
Subscribe to:
Posts (Atom)
Interview questions: 2020-12
Terraform provider vs provisioner Load balancing Network Load Balancer vs Application Load Balancer Networking Layer 1 vs Layer 4 haproxy u...
-
CRITICAL: AWS now offers internal VPC DNS! Below is no longer necessary AFAIK. Woo hoo! http://aws.amazon.com/about-aws/whats-new/2014/...
-
build sudo apt-get install git gcc sudo apt-get install automake autoconf git clone git://github.com/rriley/tsunami-udp.git cd tsunam...
-
From: https://bugs.eclipse.org/bugs/show_bug.cgi?id=382972#c4 Assumptions: jEdit was installed into /Applications directory. Close any...