Skip to content

Instantly share code, notes, and snippets.

View amclain's full-sized avatar

Alex McLain amclain

View GitHub Profile
{
// "color_scheme": "Packages/MarkdownEditing/MarkdownEditor.tmTheme",
"color_scheme": "Packages/MarkdownEditing/MarkdownEditor-Dark.tmTheme",
// "color_scheme": "Packages/MarkdownEditing/MarkdownEditor-Yellow.tmTheme",
// Layout
"draw_centered": false,
"word_wrap": true,
"wrap_width": 80,
"rulers": [80],
<!-- Custom Thrustmaster Warthog HOTAS mapping for Star Citizen -->
<!-- Binding Names: http://www.starcitizen-sgc.com/scdefaultprofile -->
<ActionMaps version="0" >
<CustomisationUIHeader device="joystick" label="JoystickTMWarthog" description="@ui_JoystickTMWarthogDesc" image="JoystickTMWarthog" />
<deviceoptions name="Joystick - HOTAS Warthog">
<!-- Reduce the deadzone -->
<option input="x" deadzone="0.015" />
<option input="y" deadzone="0.015" />
</deviceoptions>
// USB key definitions for Thrustmaster TARGET Script
// -----------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2014 Alex McLain
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
<!-- Custom Thrustmaster Warthog HOTAS mapping for Star Citizen -->
<!-- Binding Names: http://www.starcitizen-sgc.com/scdefaultprofile -->
<ActionMaps version="0" >
<actionmap name="spaceship_general">
<action name="v_eject">
<rebind device="joystick" input="js2_button21" /><!-- L/G Warning Silence -->
</action>
<action name="v_use_docking">
<rebind device="joystick" input="js2_button26" /><!-- Autopilot Engage (Black) -->
</action>
structure _Queue // generic queue structure - must init in define_start
{
char sCommand[200][100]
integer nHead
integer nTail
integer nBusy
integer nBusyTime // how long queue locks out before next command
integer nHeadMax // maximum size of queue (can't be more than first index of .sCommand)
integer nQueReady // true if response from device is an ack otherwise timeout the Que
integer nDebug // you KNOW what this does...
gem update --system
gem update
gem install \
0mq \
bundler \
compound \
fivemat \
ionian \
pry \
pry-rescue \
<!-- Saitek X36 HOTAS joystick mapping for Star Citizen -->
<ActionMaps version="0" >
<actionmap name="spaceship_general">
<action name="v_eject">
<rebind device="joystick" input="js1_button6" />
</action>
</actionmap>
<!-- <actionmap name="spaceship_view">
<action name="v_view_cycle_fwd">
<rebind device="joystick" input="js2_button3" />
// Screensaver mode.
import QtQuick 2.2
import QtQuick.Particles 2.0
import QtQuick.Controls 1.2
Rectangle {
id: root
width: 400
import QtQuick 2.2
import QtQuick.Particles 2.0
import QtQuick.Controls 1.2
Rectangle {
id: root
width: 400
height: 400
class DecoratorExample
# Add functionality to a method.
def self.my_decorator method
imeth = instance_method method
define_method method do |*args, &block|
"does stuff to " +
imeth.bind(self).call(*args, &block)
end
end