Skip to content

Instantly share code, notes, and snippets.

@evrom
evrom / elan_i2c_restarter.service
Created May 8, 2018 11:09
elan_i2c bug mitigation
[Unit]
Description=Restart touchpad driver on fail
[Service]
Type=oneshot
ExecStart=/bin/sh /usr/local/bin/elan_i2c_restarter.sh

Keybase proof

I hereby claim:

  • I am evrom on github.
  • I am evrom (https://keybase.io/evrom) on keybase.
  • I have a public key whose fingerprint is 5E61 636D C1B5 650C C77C 356D BAA5 471C 95C2 E9CF

To claim this, I am signing this object:

@evrom
evrom / practice_test.py
Created March 15, 2017 21:23
Practice Test for Python Class
from unittest import TestCase
"""
To pass, you must make 2 of the testcases pass
"""
class WordCounterTestCase(TestCase):
"""
Return a dict with the number of occurrences of an item in a list
>>> function(['hi', 'bye', 'hi'])
@evrom
evrom / fizzbuzz.c
Created February 20, 2017 22:58
FizzBuzz implementation with a function that returns a pointer to a string with proper output for given number
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#define FIZZ "Fizz"
#define FIZZ_SIZE (sizeof(FIZZ))
#define BUZZ "Buzz"
#define BUZZ_SIZE (sizeof(BUZZ))
#define FIZZBUZZ (FIZZ BUZZ)
#define FIZZBUZZ_SIZE (sizeof(FIZZBUZZ))