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 classes from './style.less'; | |
const CLASSNAME_RESIZE_SENSOR = classes['resize-sensor']; | |
export interface ResizeSensorOptions { | |
element: HTMLElement; | |
onResize(): void; | |
} | |
/** |
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
#include <USBMIDI.h> | |
// we use 74HC165 8-bit shift register ICs | |
#define CLOCK_ENABLE_PIN PB4 | |
#define PARALLEL_LOAD_PIN PB7 | |
#define CLOCK_PIN PB6 | |
#define SERIAL_DATA_PIN PB8 | |
#define FIRST_NOTE (60 - 12*2) // leftmost note of the keyboard (60 is middle C) | |
#define NOTES_COUNT (5 * 12 + 1) // number of notes |
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
/// <reference path="https://cdn.rawgit.com/borisyankov/DefinitelyTyped/master/jquery/jquery.d.ts" /> | |
interface Vector2 { x: number; y: number; } | |
interface Line { a: Vector2; b: Vector2; } | |
var drawString: (point: Vector2, string: string, color?: string) => void; | |
var drawPoint: (point: Vector2, color?: string, radius?: number) => void; | |
var drawLine: (line: Line, color?: string, thickness?: number) => void; | |
var intersect: (a: Line, b: Line, upInclusive?: boolean, downInclusive?: boolean) => Vector2 | null; | |
var angleBetweenNormalized: (a: Vector2, b: Vector2, origin?: Vector2) => number; |
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
using System; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using UnityEngine; | |
namespace SandWar.Unity.Tools | |
{ | |
/// <summary> | |
/// Attributes to be used with <see cref="Singleton<T>" />s. |
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
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; | |
namespace SandWar.Unity.Tools | |
{ | |
[AddComponentMenu("")] | |
public sealed class ModelPreview : Singleton<ModelPreview> | |
{ | |
static readonly int TemporaryLayer = 31; |
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
/// <reference path="../../defs/jquery/jquery.d.ts" /> | |
module fg.dom { | |
// get the next element in a JQuery set (returns the first element if 'current' is the last in the set) | |
var nextElement = (set: JQuery, current: Element) => { | |
var index = set.index(current); | |
if (index < set.length - 1) | |
return set.get(index + 1); |
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
@tsc --sourceMap --out out/physics.js Physics.ts | |
@if not "%errorlevel%"=="0" @pause |
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
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ | |
var saveAs=saveAs||"undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){"use strict";if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var k=a.document,n=k.createElementNS("http://www.w3.org/1999/xhtml","a"),w="download"in n,x=function(c){var e=k.createEvent("MouseEvents");e.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null);c.dispatchEvent(e)},q=a.webkitRequestFileSystem,u=a.requestFileSystem||q||a.mozRequestFileSystem, | |
y=function(c){(a.setImmediate||a.setTimeout)(function(){throw c;},0)},r=0,s=function(c){var e=function(){"string"===typeof c?(a.URL||a.webkitURL||a).revokeObjectURL(c):c.remove()};a.chrome?e():setTimeout(e,10)},t=function(c,a,d){a=[].concat(a);for(var b=a.length;b--;){var l=c["on"+a[b]];if("function"===typeof l)try{l.call(c,d||c)}catch(f){y(f)}}},m=function(c,e){var d=this,b=c.type,l=!1,f,p,k=function(){t(d,["w |
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
javascript:(function(){var%20form=document.createElement("form");form.style.display='none';form.setAttribute("method","post");form.setAttribute("action","http://validator.w3.org/check");var%20hiddenField=document.createElement("input");hiddenField.setAttribute("name","fragment");hiddenField.setAttribute("value",'<!DOCTYPE%20'+document.doctype.name+(document.doctype.publicId?'%20PUBLIC%20"'+document.doctype.publicId+'"':'')+(!document.doctype.publicId&&document.doctype.systemId?'%20SYSTEM':'')+(document.doctype.systemId?'%20"'+document.doctype.systemId+'"':'')+'>\n'+document.documentElement.outerHTML);form.appendChild(hiddenField);document.body.appendChild(form);form.submit();})(); |
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
using System; | |
using System.Runtime.InteropServices; | |
using System.Windows.Forms; | |
namespace Fabiogiopla.Utilities.Hotkey | |
{ | |
[Serializable] | |
public sealed class HotkeyHandler : IEquatable<HotkeyHandler>, ICloneable | |
{ | |
private const int ALT = 0x0001; |