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
;;; shellcheck.el --- shellcheck compilation -*- lexical-binding: t; -*- | |
;;; Commentary: | |
;; | |
;; Compilation output for .sh and .bat files using shellcheck | |
;; | |
;; Provides: | |
;; - font-locking in the output buffer via `xterm-color' | |
;; - links b/w shellcheck output and source locations | |
;; - converts 'SC****' warnings/errors to buttons that link to their documentation |
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
#!/bin/bash | |
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont' |
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 <inttypes.h> | |
typedef enum { | |
UTF8_OK = 0, | |
UTF8_ERROR = 4, | |
} utf8_decode_state_t; | |
typedef struct { | |
utf8_decode_state_t state; | |
uint32_t codepoint; |
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
/* | |
Constant-time integer comparisons | |
Written in 2014 by Samuel Neves <[email protected]> | |
To the extent possible under law, the author(s) have dedicated all copyright | |
and related and neighboring rights to this software to the public domain | |
worldwide. This software is distributed without any warranty. | |
You should have received a copy of the CC0 Public Domain Dedication along with |
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
/* | |
SSSE3/XOP bit reversal | |
Written in 2014 by Samuel Neves <[email protected]> | |
To the extent possible under law, the author(s) have dedicated all copyright | |
and related and neighboring rights to this software to the public domain | |
worldwide. This software is distributed without any warranty. | |
You should have received a copy of the CC0 Public Domain Dedication along with |
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 perl | |
use strict; | |
use LWP::Simple; | |
sub pick { $_[rand @_] } | |
my $text = get "https://gist.github.com/shanselman/5422230/raw/9863d88bde2f9dcf6b2e7a284dd4a428afdc8c8b/gistfile1.txt"; | |
my @samples = split /\|\n/, $text; | |
my $template = pick @samples; |
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
@echo off | |
setlocal | |
if "%CYGWIN_ROOT%" == "" set CYGWIN_ROOT=C:\cygwin | |
if not exist "%CYGWIN_ROOT%"\ ( | |
echo directory %CYGWIN_ROOT% does not exist | |
echo please set the variable CYGWIN_ROOT | |
exit /B 1 | |
) |