THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
| #!/bin/bash | |
| exec 5<> /dev/hidraw1 | |
| echo -e '\x00\x01\x80\x33\x01\x00\x00\x00\x00\c' >&5 | |
| OUT=$(dd count=1 bs=8 <&5 2>/dev/null | xxd -p) | |
| HEX4=${OUT:4:4} | |
| DVAL=$((16#$HEX4)) | |
| # handle negative temperatures | |
| if [[ $DVAL -gt 32767 ]]; then | |
| DVAL=$(($DVAL-65536)) | |
| fi |
| #!/usr/bin/env zsh | |
| # | |
| # See the following AskUbuntu question for why this is a thing | |
| # https://askubuntu.com/questions/1024281/dell-xps-13-9370-bluetooth-issues/1148484#1148484 | |
| # | |
| # As the overwritten files are owned by the linux-firmware package you may want to add this | |
| # script to an @reboot cron of the root user. | |
| # | |
| # This script uses the Windows driver package as the src of the firmware bin files. This can | |
| # be acquired from https://www.dell.com/support/home/uk/en/ukbsdt1/drivers/driversdetails?driverId=1JVK3 |
| #!/usr/bin/env python | |
| """ | |
| Download data from a Rigol DS1052E oscilloscope and graph with matplotlib. | |
| By Ken Shirriff, http://righto.com/rigol | |
| Based on http://www.cibomahto.com/2010/04/controlling-a-rigol-oscilloscope-using-linux-and-python/ | |
| by Cibo Mahto. | |
| """ |
| #!/usr/bin/env python | |
| import argparse | |
| from struct import * | |
| import re | |
| def write_raw_palette(palette, output_path, write_header): | |
| data = "" | |
| header = pack('I', len(palette)) |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
| def getCheckedOutGitCommitHash() { | |
| def gitFolder = "$projectDir/.git/" | |
| def takeFromHash = 12 | |
| /* | |
| * '.git/HEAD' contains either | |
| * in case of detached head: the currently checked out commit hash | |
| * otherwise: a reference to a file containing the current commit hash | |
| */ | |
| def head = new File(gitFolder + "HEAD").text.split(":") // .git/HEAD | |
| def isCommit = head.length == 1 // e5a7c79edabbf7dd39888442df081b1c9d8e88fd |
| #!/usr/bin/ruby | |
| # Create display override file to force Mac OS X to use RGB mode for Display | |
| # see http://embdev.net/topic/284710 | |
| require 'base64' | |
| data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
| edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
| vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
| #! /usr/bin/env python | |
| """ Convert an image (argv[1]) to an ANSI text string (xterm-256color) | |
| Original readme from colortrans.py follows: | |
| Nice long listing of all 256 colors and their codes. Useful for | |
| developing console color themes, or even script output schemes. | |
| Resources: |