Skip to content

Instantly share code, notes, and snippets.

Evan Klitzke eklitzke

Block or report user

Report or block eklitzke

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
View fancontrol
#!/bin/bash
#
# Simple script implementing a temperature dependent fan speed control
# Supported Linux kernel versions: 2.6.5 and later
#
# Version 0.71
#
# Usage: fancontrol [CONFIGFILE]
#
# Dependencies:
View gist:97dc94021b7c0d527c364714063c49bc
irc/accounts.go:366:10: Error return value of `tx.Set` is not checked (errcheck)
tx.Set(accountKey, "1", setOptions)
^
irc/accounts.go:367:10: Error return value of `tx.Set` is not checked (errcheck)
tx.Set(accountNameKey, account, setOptions)
^
irc/accounts.go:368:10: Error return value of `tx.Set` is not checked (errcheck)
tx.Set(registeredTimeKey, registeredTimeStr, setOptions)
^
irc/accounts.go:384:16: Error return value of `am.Unregister` is not checked (errcheck)
View for.cc
#include <iostream>
int main() {
for (int i = 20; i--; ) {
std::cout << i << "\n";
}
return 0;
}
View parens.go
package main
import "fmt"
func isValid(x int) bool {
s := 0
for y := 1; y <= 0x2000; y <<= 1 {
if x&y == 0 {
// 0-bit means open paren, push the stack
s++
View parens.go
package main
import "fmt"
func isValid(x int) bool {
b := 0
s := 0
for y := 1; y <= x; y <<= 1 {
if x&y == 0 {
s++
View pirates.md

Problem Statement

A group of N pirates buries a treasure chest, where N is an odd number. The treasure chest is locked with multiple locks. For each lock, you may have any number of copies of the key that opens that lock. Each of the pirates receives one or more keys. The goal is to design a scheme where if any minority group (less than half) of the pirates come together, it's guaranteed that they do not have all of the keys needed to open the locks on the chest. At the same time, any majority group (more than half) of the pirates is guaranteed to have enough keys to open all of the locks. For example, if there are 11 pirates, the keys

View App.js
// App.js
import React, { Component } from 'react';
class App extends Component {
state = {
todos: []
};
async componentDidMount() {
try {
View wtfisthis.txt
$ ssh otd
Welcome to Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-1015-gcp x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Fri Sep 21 06:17:42 UTC 2018
System load: 0.4 Processes: 136
View lol.sh
for e in ${_environment}; do
eval "export $e"
done
View fuck.go
// PushType represents a value that can be pushed into the hierarchy.
type PushType map[string]interface{}
func init() {
gob.Register(PushType{})
}
var errBadPushCast = errors.New("bad push cast")
// go is so fucking stupid
You can’t perform that action at this time.