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 clr | |
from pprint import pformat | |
import System | |
from System.Reflection import * | |
analogMap = [] | |
global analogMap | |
jogMap = [] | |
global jogMap | |
buttonMap = [] |
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 clr | |
from pprint import pformat | |
import System | |
from System.Reflection import * | |
analogMap = [] | |
global analogMap | |
jogMap = [] | |
global jogMap | |
buttonMap = [] |
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
def analog(midiNum, analogNum, stick, axis): | |
analogMap.append([midiNum, analogNum, stick, axis]) | |
def jog(midiNum, knobNum, stick, buttonL, buttonR): | |
jogMap.append([midiNum, knobNum, stick, buttonL, buttonR]) | |
def button(midiNum, buttonNum, stick, button): | |
buttonMap.append([midiNum, buttonNum, stick, button]) | |
def update(): |
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
def knob(midiNum, knobNum, axis): | |
knobMap.append([midiNum, knobNum, axis]) | |
def update(): | |
diagnostics.watch(midi[1].data.buffer[0]) | |
diagnostics.watch(midi[1].data.buffer[1]) | |
diagnostics.watch(vJoy[0].axisMax * midi[1].data.buffer[1] / 127) | |
for k in knobMap: | |
if midi[k[0]].data.buffer[0] == k[1]: | |
k[2] = vJoy[0].axisMax * midi[k[0]].data.buffer[1] / 127 |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>scopeName</key> | |
<string>source.marpa</string> | |
<key>fileTypes</key> | |
<array> | |
<string>marpa</string> | |
<string>mr2</string> |
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
#!/usr/bin/env perl | |
use 5.020; | |
use utf8; | |
use Net::Abuse::Reporter; | |
use My::Abuse::Log::Getter qw( get_log ); | |
my $reporter = Net::Abuse::Reporter->new(); |
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
:default ::= action => [ values ] bless => ::lhs | |
lexeme default = action => [ start, length, value ] bless => ::name latm => 1 | |
:discard ~ whitespace | |
whitespace ~ [\s]+ | |
:discard ~ comment | |
comment ~ terminatedcomment | finalcomment | |
terminatedcomment ~ '//' commentbody vspace | |
finalcomment ~ '//' commentbody | |
commentbody ~ commentchar* | |
vspace ~ [\x{A}\x{B}\x{C}\x{D}\x{2028}\x{2029}] |
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
upstream myapp { | |
server unix:/local/myapp/myapp.sock; | |
} | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
root /local/myapp/public/; |
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
sub as_n128 { | |
my $self = shift; | |
my $rv; | |
{ | |
use Math::BigInt try => 'GMP,Pari,Calc'; | |
my $accum = Math::BigInt->new('0'); | |
my $factor = Math::BigInt->new('1')->blsft(Math::BigInt->new('32')); | |
for my $i (map { $_ * 4 } 0 .. 3) { | |
$accum->bmul($factor); | |
$accum->badd(Math::Bigint->new('' . unpack 'N32', substr($self->{ address }, $i, 4))); |
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
package Data::Dumper::Table; | |
use 5.020; | |
use utf8; | |
no diagnostics; | |
use Scalar::Util qw( reftype refaddr blessed ); | |
use Text::Table; | |
use Exporter qw( import ); |
NewerOlder