Skip to content

Instantly share code, notes, and snippets.

View dkowis's full-sized avatar
☢️

David Kowis dkowis

☢️
View GitHub Profile
@jean-merelis
jean-merelis / _ng-select-theme.scss
Last active December 8, 2023 16:15
Directive that provides support for MatFormFieldControl (Angular Material) in NgSelect.
// WIP
@import '~@angular/material/theming';
@mixin ng-select-theme($theme) {
$primary: map-get($theme, primary);
$accent: map-get($theme, accent);
$warn: map-get($theme, warn);
$isdark: map-get($theme, is-dark);
$foreground: map-get($theme, foreground);
@whizzzkid
whizzzkid / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Last active December 3, 2022 15:43
[XPS 15 Early 2017 9560 kabylake] Making Nvidia Drivers + (CUDA 8 / CUDA 9 / CUDA 9.1) + Bumblebee work together on linux ( Ubuntu / KDE Neon / Linux Mint / debian )
# Instructions for 4.14 and cuda 9.1
# If upgrading from 4.13 and cuda 9.0
$ sudo apt-get purge --auto-remove libcud*
$ sudo apt-get purge --auto-remove cuda*
$ sudo apt-get purge --auto-remove nvidia*
# also remove the container directory direcotory at /usr/local/cuda-9.0/
# Important libs required with 4.14.x with Cuda 9.X
$ sudo apt install libelf1 libelf-dev
#!/bin/bash
set -e
JAVA_HOME=${1-text}
[ $# -eq 0 ] && { echo "Usage: sudo $0 \$(/usr/libexec/java_home -v '1.8*')" ; exit 1; }
KEYSTORE=$JAVA_HOME/jre/lib/security/cacerts
wget https://letsencrypt.org/certs/letsencryptauthorityx1.der
wget https://letsencrypt.org/certs/letsencryptauthorityx2.der
@rschreijer
rschreijer / MetricRegistryJsonProtocol.scala
Last active September 17, 2019 23:53
spray-json protocol for the Metric lib. Serializes a MetricRegistry and/or single Metric objects from Spray. See https://dropwizard.github.io/metrics, https://github.com/spray/spray-json
package spray.json.examples
import java.util.concurrent.TimeUnit
import scala.collection.JavaConverters._
import scala.util.{Try, Success, Failure}
import com.codahale.metrics._
import spray.json._
@dant3
dant3 / mvncolor.sh
Last active January 9, 2017 04:57 — forked from katta/mvncolor.sh
#!/usr/bin/env bash
# Formatting constants
BOLD=`tput bold`
UNDERLINE_ON=`tput smul`
UNDERLINE_OFF=`tput rmul`
TEXT_BLACK=`tput setaf 0`
TEXT_RED=`tput setaf 1`
TEXT_GREEN=`tput setaf 2`
TEXT_YELLOW=`tput setaf 3`
@sasimpson
sasimpson / isitquesoweek.py
Created October 30, 2013 16:20
determines if it is queso week at Biff Buzby's Burgers. Assumes the beginning of the week is Monday.
#!/usr/bin/python
import sys
import datetime
import argparse
def is_queso_week(today=None):
if today is None:
today = datetime.datetime.now()
if today.weekday() is not 0:
@cdombroski
cdombroski / backend-caller.sh
Created August 26, 2013 14:10
Full backend debugging for dovecot-antispam
#!/bin/bash
tmpf=/tmp/antispam.log.$$
(
date
id
let i=0
for arg; do
let i=1+i
echo "arg $i $arg"
done