Skip to content

Instantly share code, notes, and snippets.

@pinge
pinge / README.md
Last active December 24, 2015 06:29
Supermicro X9SCM-Fii

There is a Solaris “bug” (if you can call it that) that limits ARC cache to 7/8 of total system memory. This was intentional so that the ARC cache couldn’t cause contention for swapfile space in RAM. That “bug” still exists in Nexenta 3.1.2. This is why I have 30GB of RAM free on a 192GB system. 1/8 system memory made sense when monster systems were 8GB. That left 1GB of RAM that wouldn’t be touched for ARC caching to ensure proper system operation. Today the amount of RAM in systems dwarfs what most people would have used 10 years ago, and as such we need to make modifications. Fortunately, we can tune this variable.

http://www.zfsbuild.com/2012/04/18/let-zfs-use-all-of-your-ram/

@pinge
pinge / git.md
Last active July 21, 2017 03:02
git cheatsheet

change a specific author email address by rewriting history:

git filter-branch --env-filter '
  if [ $GIT_AUTHOR_EMAIL = current@email ]; then GIT_AUTHOR_EMAIL=updated@email; fi;
  export GIT_AUTHOR_EMAIL;
'

change commit author for specific commits:

@pinge
pinge / gist:7880602
Created December 9, 2013 20:49
top.sls
base:
'*':
- core
- elasticsearch
- keychain
- grunt
development:
'roles:database':
- match: grain
master: localhost
file_client: local
file_roots:
base:
- /srv/salt/common/states
development:
- /srv/salt/development/states
production:
- /srv/salt/production/states
vagrant@dev:~$ sudo salt-call state.show_top env=development
[INFO ] Loading fresh modules for state activity
local:
----------
development:
- base.core
- elasticsearch
- keychain
- grunt
- mysql
[DEBUG ] Rendered data from file: /srv/salt/development/states/../../top.sls:
development:
'roles:database':
- match: grain
- base.core
- elasticsearch
- keychain
- grunt
- mysql
@pinge
pinge / ssh.md
Last active August 29, 2015 13:55
SSH

SSH Agent in bash script

eval $(ssh-agent)
ssh-add
vagrant up

SSH Agent in bash command with exit code

@pinge
pinge / scala.md
Last active August 29, 2015 13:56
scala

sbt compile with deprecation warnings

$ sbt
> set scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation")
> compile

check scala version

@pinge
pinge / ubuntu_14.04_macbook_pro_retina_15_inch_mid_2014.md
Last active March 10, 2021 03:05
How to install Ubuntu 14.04.1 LTS on a MacBook Pro Retina 15" Mid 2014 (11,3)
@pinge
pinge / spray_api.md
Last active August 29, 2015 14:07
ideas for an api structure with spray

com.compstak.models.Comp

package com.compstak.models

import com.github.nscala_time.time.Imports._

case class Comp(id: Int, createdAt: DateTime)

com.compstak.models.Market