Skip to content

Instantly share code, notes, and snippets.

💡
Science 🔬 + FLOSS 🐧 = 💖

Kevin Wittek kiview

💡
Science 🔬 + FLOSS 🐧 = 💖
Block or report user

Report or block kiview

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
@kiview
kiview / disable-nvidia.sh
Last active Jan 3, 2019
Dell XPS 15 9570 - Fedora 29
View disable-nvidia.sh
# Since out of the box support of nvidia is sketchy, I've done these things to disable nvidia completey.
# Disable nouveau driver
vim /etc/default/grub
# -> Disable nouveau, also use s3 as default suspend mode
# GRUB_CMDLINE_LINUX="resume=/dev/mapper/fedora-swap rd.lvm.lv=fedora/root rd.luks.uuid=my-id rd.lvm.lv=fedora/swap rhgb quiet nouveau.modeset=0 mem_sleep_default=deep"
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
@kiview
kiview / day1_1.groovy
Last active Dec 15, 2017
Advent of Code 2017
View day1_1.groovy
def calcDigitSum(String digits) {
digits.collect {it}.withIndex().collect { String entry, int i ->
def nextIndex = (i < digits.length() - 1) ? i + 1 : 0
String nextDigit = digits[nextIndex]
(entry == nextDigit) ? Integer.parseInt(entry) : 0
}.sum()
}
View kafka-stream.groovy
@Bean
KTable reportStream(StreamsBuilder builder, Engine engine) {
def stream = builder.stream(topic)
.groupBy({ key, word -> word })
.windowedBy(SessionWindows.with(TimeUnit.SECONDS.toMillis(1)))
.aggregate(
new Initializer<Long>() {
@Override
Long apply() {
@kiview
kiview / ansible_install.sh
Created Jan 22, 2017
Install Ansible on Ubuntu
View ansible_install.sh
apt-get install software-properties-common
apt-add-repository ppa:ansible/ansible
apt-get update
apt-get install ansible
@kiview
kiview / upgrade.yml
Last active Aug 10, 2019
Ubuntu upgrade with Ansible
View upgrade.yml
---
- hosts:
- all
become: true
tasks:
- name: Update apt cache
apt: update_cache=yes
- name: Upgrade packages
apt: upgrade=dist
@kiview
kiview / docker_volume_backup.sh
Last active Aug 12, 2019
Docker-Compose volume backup
View docker_volume_backup.sh
#!/bin/bash
compose_file_path=$1
project_name=$2
backup_path=$3
function backup_volume {
volume_name=$1
backup_destination=$2
@kiview
kiview / docker_on_ubuntu.sh
Last active Jul 15, 2016
Small install script for docker on Ubunttu
View docker_on_ubuntu.sh
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
ubuntuVersion=`lsb_release -sr`
case "$ubuntuVersion" in
@kiview
kiview / description.md
Last active Jun 28, 2016
rocket.chat with docker-compose
View description.md

Rocket.Chat Over HTTPS with Docker Compose

Instructions about how to setup a Rocket.Chat server including a HTTPS reverse proxy with docker-compose.

docker-compose.yaml

mongo:
  image: mongo
You can’t perform that action at this time.