Skip to content

Instantly share code, notes, and snippets.

@KieronQuinn
KieronQuinn / ControlTile.kt
Created June 11, 2020 19:46
Controls API Sample
package com.kieronquinn.app.controltest
import android.app.PendingIntent
import android.app.Service
import android.content.ComponentName
import android.content.Intent
import android.content.res.ColorStateList
import android.graphics.Color
import android.graphics.drawable.Icon
import android.os.Bundle
@RealDeanZhao
RealDeanZhao / autowire-resttemplate.md
Last active May 23, 2023 07:45
How to autowire RestTemplate using annotations

From StackOverflow

Errors you'll see if a RestTemplate isn't defined

Consider defining a bean of type 'org.springframework.web.client.RestTemplate' in your configuration.

or

No qualifying bean of type

@kristerw
kristerw / build-gcc-offload-nvptx.sh
Last active May 23, 2024 13:05
Build GCC with support for offloading to NVIDIA GPUs
#!/bin/sh
#
# Build GCC with support for offloading to NVIDIA GPUs.
#
work_dir=$HOME/offload/wrk
install_dir=$HOME/offload/install
# Location of the installed CUDA toolkit
@harish2704
harish2704 / grub.cfg
Last active June 6, 2019 13:41
grub.cfg for live boot of custom usb drive
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
menuentry "Try openSUSE Tumbleweed GNOME Live ISO" {
set gfxpayload=keep
set iso_path=/openSUSE-Tumbleweed-GNOME-Live-x86_64-Snapshot20180220-Media.iso
loopback loop0 ${iso_path}
echo Loading kernel...
@Pysis868
Pysis868 / grub.cfg
Last active May 29, 2024 20:27
My own configuration file for GRUB2 to boot various live distributions of Linux-based operating systems, along with some system tools. I tried to include a lot of sample configuration entries, even if I don't currently use them, so it may help others. Exceedingly long blog post: http://tehfishyblog.logdown.com/chips/306146-a-homemade-ultimate-bo…
# Config for GNU GRand Unified Bootloader (GRUB) (2)
# /boot/grub2/grub.cfg
# or
# /boot/grub/grub.cfg
# Mostly only 'legacy' CSM/BIOS boot methods currently.
# Unable to boot loop entries with Secure Boot
# Notes:
# Description:
# This grub.cfg file was created by Lance http://www.pendrivelinux.com
@keo
keo / bootstrap.sh
Last active January 25, 2024 15:49
Setup encrypted partition for Docker containers
#!/bin/sh
# Setup encrypted disk image
# For Ubuntu 14.04 LTS
CRYPTFS_ROOT=/cryptfs
apt-get update
apt-get -y upgrade
apt-get -y install cryptsetup
@psyao
psyao / Vagrantfile
Last active February 18, 2022 18:53
Vagrant config file and provisioning script
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Box to build off of.
config.vm.box = "precise32"