This file contains hidden or 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
| # Logitech Pebble Keys 2 K380s | |
| ACTION=="add", SUBSYSTEM=="input", KERNEL=="event[0-9]*", SUBSYSTEMS=="input", ATTRS{id/vendor}=="046d", ATTRS{id/product}=="b377", SYMLINK+="input/logi-k380s", RUN+="/usr/bin/systemctl start vkey-logi-k380s" | |
| ACTION=="remove", SUBSYSTEM=="input", KERNEL=="event[0-9]*", SUBSYSTEMS=="input", ATTRS{id/vendor}=="046d", ATTRS{id/product}=="b377", RUN+="/usr/bin/systemctl stop vkey-logi-k380s" |
This file contains hidden or 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
| iterator groups[T](coll: openarray[T], n: static[int], fill: T): auto = | |
| static: assert n > 0 | |
| var result: array[n, T] | |
| var i = coll.low | |
| var high = coll.high | |
| while i <= high: | |
| for j in 0..<n: | |
| if i + j <= high: |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| require 'io/console' | |
| def clear | |
| print "\e[u" # restore cursor | |
| print "\e[J" # clear to bottom of screen | |
| end | |
| print "\e[s" # save cursor |
This file contains hidden or 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
| (defun good-font-height () | |
| (- (/ (display-pixel-height) 5) 50)) | |
| (defun set-font-height (height) | |
| (interactive (list (read-number "Font height: " (good-font-height)))) | |
| (set-face-attribute 'default nil :height height)) | |
| (defun zoom (inc) | |
| (interactive "nIncrement: ") | |
| (let ((new-font-height (+ (* 10 inc) (face-attribute 'default :height)))) |
This file contains hidden or 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
| #include "ergodox_ez.h" | |
| #include "debug.h" | |
| #include "action_layer.h" | |
| #define BASE 0 // default layer | |
| #define SYM1 1 // symbols | |
| #define SYM2 2 // symbols 2 | |
| #define MDIA 3 // media | |
| const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
This file contains hidden or 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 7000 lda #$00 | |
| ldx #$00 | |
| ldy #$00 | |
| sta $d020 | |
| sta $d021 | |
| adc #$01 | |
| inx | |
| cpx #$ff | |
| beq $7013 | |
| iny |
This file contains hidden or 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 std.stdio; | |
| import std.stdint; | |
| import std.string; | |
| import std.conv; | |
| import core.memory; | |
| extern (C) Png.png_image_t read_png(ubyte* in_data, size_t in_size, void* function(uint32_t) alloc); | |
| class Png | |
| { |
This file contains hidden or 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 std.stdio; | |
| import std.exception; | |
| const size_t BUFFER_LENGTH = 4096; | |
| int main(string argv[]) | |
| { | |
| byte buffer[BUFFER_LENGTH]; | |
| void outputFile(File fp) |
This file contains hidden or 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 std.process; | |
| import std.regex; | |
| import std.array; | |
| const string executable = "ld.orig"; | |
| void main(string argv[]) | |
| { | |
| auto reg = regex(r"-framework=([^ ]+)", "g"); | |
| auto cmdline = replace(argv[1..$].join(" "), reg, r"-framework $1"); |