Skip to content

Instantly share code, notes, and snippets.

Lari Hotari lhotari

Block or report user

Report or block lhotari

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
lhotari /
Created Oct 25, 2019
Ubuntu 18.04 Linux kernel settings for Dell Latitude 7480
sudo apt-get update
sudo apt-get install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04
sudo mkdir /etc/default/grub.d
# adjust i915 related kernel parameters
# references for different settings:
# intel_iommu=igfx_off -
# intel_idle.max_cstate=4
apt-get install autojump zsh tig git htop vim wget
apt-get install apt-transport-https ca-certificates curl software-properties-common
apt-get install libgnome-keyring-dev && (cd /usr/share/doc/git/contrib/credential/gnome-keyring && make)
apt-get install indicator-sysmonitor
apt-get install keepass2
curl -fsSL | apt-key add -
add-apt-repository "deb [arch=amd64] $(lsb_release -cs) stable"
sudo apt-get install linux-generic-hwe-16.04 linux-image-generic-hwe-16.04 linux-tools-generic-hwe-16.04 linux-image-extra-virtual-hwe-16.04
sudo apt-get install xserver-xorg-hwe-16.04
# Disables Spotlight / mdworker and Time Machine backups for all build and .gradle directories under the working directory.
/usr/bin/find . '(' -name build -or -name .gradle ')' -exec touch "{}/.metadata_never_index" \;
/usr/bin/find . '(' -name build -or -name .gradle ')' -exec xattr -w "{}" \;
View splitted_xml_slurping.groovy
// Example of using StAX to split a large XML document and parse a single element using XmlSlurper
import javax.xml.transform.Transformer
import javax.xml.transform.TransformerFactory
import javax.xml.transform.sax.SAXResult
import javax.xml.transform.stax.StAXSource
def url = new URL("")
lhotari /
Created May 6, 2015
dumping threads in code on Java8+
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class DiagnosticCommandMBeanHelper {
public static String threadPrint() throws ReflectionException, MBeanException {
try {

Keybase proof

I hereby claim:

  • I am lhotari on github.
  • I am lhotari ( on keybase.
  • I have a public key whose fingerprint is 53A8 9613 1119 4A6B 0A44 97D9 E535 CAAF 8594 137E

To claim this, I am signing this object:

View generate_plugins_markdown.groovy
* Script for generating Markdown for
@GrabResolver(name='grailsCore', root='', m2Compatible='true')
@Grab(group='org.slf4j', module='slf4j-nop', version='1.7.10')
@Grab(group='org.grails', module='grails-datastore-rest-client', version='4.0.0.M3')
def githubApiToken = System.getenv('GH_API_TOKEN')
lhotari / gist:8d615fc20aa852247f35
Created Dec 9, 2014
View gist:8d615fc20aa852247f35
brew install caskroom/cask/brew-cask
brew cask install virtualbox
brew cask install vagrant
vagrant plugin install vagrant-cachier
vagrant plugin install vagrant-vbguest
vagrant plugin install vagrant-omnibus
View delete_remote_issue_links.groovy
You can’t perform that action at this time.