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
lhotari / configure_grub_for_dell_7480.sh
Created Oct 25, 2019
Ubuntu 18.04 Linux kernel settings for Dell Latitude 7480
View configure_grub_for_dell_7480.sh
#!/bin/bash
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 - https://bugs.archlinux.org/task/55629
# intel_idle.max_cstate=4
View ubuntu_install.sh
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 https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
View install_hwe_kernel_to_ubuntu16.04.sh
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
View disable_indexing_and_backups_for_build_dirs.sh
#!/bin/bash
# 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 com.apple.metadata:com_apple_backup_excludeItem com.apple.backupd "{}" \;
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.stream.XMLInputFactory
import javax.xml.stream.XMLStreamReader
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("http://repo2.maven.org/maven2/archetype-catalog.xml")
@lhotari
lhotari / DiagnosticCommandMBeanHelper.java
Created May 6, 2015
dumping threads in code on Java8+
View DiagnosticCommandMBeanHelper.java
import javax.management.DynamicMBean;
import javax.management.MBeanException;
import javax.management.ReflectionException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class DiagnosticCommandMBeanHelper {
public static String threadPrint() throws ReflectionException, MBeanException {
try {
View keybase.md

Keybase proof

I hereby claim:

  • I am lhotari on github.
  • I am lhotari (https://keybase.io/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
* https://github.com/grails/grails-core/wiki/Travis-CI-status
*/
@GrabResolver(name='grailsCore', root='https://repo.grails.org/grails/core/', 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')
import grails.plugins.rest.client.RestBuilder
def githubApiToken = System.getenv('GH_API_TOKEN')
@lhotari
lhotari / gist:8d615fc20aa852247f35
Created Dec 9, 2014
install_vagrant_on_macosx.sh
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.