This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
# Filter a command like rubocop to look for issues only on modified lines. | |
# | |
# Inspired by http://takemikami.com/2018/01/30/RubocopPullRequestCI.html | |
# | |
BASE_REMOTE=origin | |
BASE_BRANCH=master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.thingiverse.com/developers/rest-api-reference | |
/******************************************************************************* | |
* The headers needed for authenticating with the API. | |
* Get the SECRET_TOKEN using the browser tools of Firefox or Chrome: | |
* 1. Open the browser tools with F12 or ctrl+shift+i | |
* 2. Navigate to the Network tab | |
* 3. Reload a Thingiverse page | |
* 4. Locate a and select a request to api.thingiverse.com | |
* 5. Find the request headers and copy the token next to Authorization: Bearer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# This can reproduce https://github.com/activeldap/activeldap/issues/186 | |
# | |
# Uses OpenLDAP Docker container | |
# docker run -p 1389:389 --name activeldap-test --detach osixia/openldap | |
# | |
require 'active_ldap' | |
class User < ActiveLdap::Base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# A demonstration of the DN and base issue detailed in | |
# https://github.com/activeldap/activeldap/issues/185 | |
# Due to how requires are handled, we need to do some directory | |
# trickery to require our local copy of the source code. | |
base_dir = File.expand_path(File.dirname(__FILE__)) | |
top_dir = File.expand_path(File.join(base_dir, "..")) | |
lib_dir = File.join(top_dir, "lib") | |
$LOAD_PATH.unshift(File.join __dir__, 'lib') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The total number of threads we want to all to run at the same time | |
concurrent_thread_limit = 4 | |
# The total number of threads to run for this demo | |
total_thread_count = 13 | |
@threads = [] | |
## | |
# Print the status of all threads to the console | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import time | |
# https://pypi.org/project/evdev/ | |
import evdev | |
string = 'We are typing this 1!' | |
with evdev.UInput() as ui: | |
escape = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/haproxy/haproxy.cfg | |
global | |
maxconn 4096 | |
user haproxy | |
group haproxy | |
daemon | |
log 127.0.0.1 local0 debug | |
# Default SSL material locations | |
ca-base /etc/ssl/certs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Kevin McCormack <[email protected] | |
pkgname=rocm-opencl | |
pkgver=1.2.0 | |
pkgverdate=2018090737 | |
pkgrel=2 | |
_debfile=rocm-opencl_${pkgver}-${pkgverdate}_amd64.deb | |
pkgdesc="ROCm Platform Runtime: Closed source opencl" | |
arch=('x86_64') | |
url="https://github.com/RadeonOpenCompute/ROCm" | |
license=('EULA') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install HydraPaper on Ubuntu 18.04 | |
# No super user access required if flatpak is installed | |
# HarlemSquirrel.github.io | |
# Install flatpak | |
sudo apt install -y flatpak gnome-software-plugin-flatpak | |
# Add flathub repo for the current user | |
flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// /etc/apt/apt.conf.d/50unattended-upgrades | |
// Unattended-Upgrade::Origins-Pattern controls which packages are | |
// upgraded. | |
// | |
// Lines below have the format format is "keyword=value,...". A | |
// package will be upgraded only if the values in its metadata match | |
// all the supplied keywords in a line. (In other words, omitted | |
// keywords are wild cards.) The keywords originate from the Release | |
// file, but several aliases are accepted. The accepted keywords are: | |
// a,archive,suite (eg, "stable") |