Skip to content

Instantly share code, notes, and snippets.

View ricardoanguiano's full-sized avatar

Ricardo Anguiano ricardoanguiano

View GitHub Profile
@ricardoanguiano
ricardoanguiano / dot-emacs-fragment.el
Created December 8, 2014 02:14
Emacs settings for symmetrically encrypted files
;; ------------------------------------------------------------------------
;; gpg encrypted files
;; visit anything.gpg to automatically encrypt and decrypt.
(require 'epa-file)
(epa-file-enable)
(setq epg-gpg-program "c:/Program Files (x86)/GNU/GnuPG/gpg.exe")
(setq epa-file-cache-passphrase-for-symmetric-encryption t)
(setq epa-textmode t)
(setq epa-armor t)
@ricardoanguiano
ricardoanguiano / encrypt-me.txt
Created December 8, 2014 02:26
Emacs file variables for symmetrically encrypted files
;; -*- mode: text; epa-file-encrypt-to: nil -*-
@ricardoanguiano
ricardoanguiano / lightdm-vncserver-notes.txt
Created December 9, 2014 02:08
lightdm vncserver setup on ubuntu 12.04
# apt-get install gnome-panel
# apt-get install tightvncserver
# vncpasswd /etc/vncpasswd
/etc/lightdm/lightdm.conf addition
[VNCServer]
enabled=true
greeter-session=lightdm-gtk-greeter
user-session=gnome
@ricardoanguiano
ricardoanguiano / gist:f728970037552cd59d2e
Last active August 29, 2015 14:14
Local Link Addresses

Wikipedia

http://en.wikipedia.org/wiki/Private_network#Link-local_addresses

The block 169.254.0.0/16 is reserved for this purpose, with the exception of the first and the last /24 subnets in the range. If a host on an IEEE 802 (ethernet) network cannot obtain a network address via DHCP, an address from 169.254.1.0 to 169.254.254.255 may be assigned pseudorandomly. The standard prescribes that address collisions must be handled gracefully.

Linux

/media/boot/EFI/BOOT/grub.cfg modified with new command line for ip address change:
  • linux /vmlinuz LABEL=boot root=/dev/ram0 ip=169.254.10.10:::255.255.0.0:::off:: console=ttyUSB0,115200 console=tty0 radeon.dpm=1
@ricardoanguiano
ricardoanguiano / ospi-notes.md
Last active August 29, 2015 14:16
open sprinkler raspberry pi setup

Before booting

Edit /etc/network/interfaces for local wireless network.

Install ntpdate

# apt-get install ntpdate

Set timezone

# raspi-config
# 4, 2, America/Los_Angeles
ip link set eth1 up
ip addr add IP/24 dev eth1
ip route add default via 192.168.11.1
@ricardoanguiano
ricardoanguiano / gsettings.md
Last active August 29, 2015 14:26
Linux automount Nautilus enable disable
@ricardoanguiano
ricardoanguiano / linux-raid0.txt
Last active December 15, 2015 15:58
Linux RAID0
root@trusty01:~# fdisk -l /dev/sdb
Disk /dev/sdb: 256.1 GB, 256060514304 bytes
234 heads, 63 sectors/track, 33924 cylinders, total 500118192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xba903263
Device Boot Start End Blocks Id System
@ricardoanguiano
ricardoanguiano / bonnie++-raid0.txt
Created December 1, 2015 07:02
Benchmark bonnie++ raid0
root@trusty01:/scratch/ricardo# bonnie++ -d `pwd` -u 1000
Using uid:1000, gid:1000.
Writing a byte at a time...done
Writing intelligently...done
Rewriting...done
Reading a byte at a time...done
Reading intelligently...done
start 'em...done...done...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
@ricardoanguiano
ricardoanguiano / bonnie++-single-ssd.txt
Created December 1, 2015 07:07
Benchmark bonnie++ single ssd
root@trusty01:~# bonnie++ -d `pwd` -u 1000
Using uid:1000, gid:1000.
Writing a byte at a time...done
Writing intelligently...done
Rewriting...done
Reading a byte at a time...done
Reading intelligently...done
start 'em...done...done...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.