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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
HotkeyList := [] | |
activateWindow(index) { | |
global HotkeyList | |
winId := HotkeyList[index] |
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
class Mutex { | |
static from(mutexLikeStruct) { | |
let instance = new this(); | |
try { | |
instance.shared = mutexLikeStruct.shared; | |
} catch(ex) { | |
throw new TypeError('Structure does not have a shared property'); | |
} |
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
(function() { | |
'use strict'; | |
function IOSArrowKeys(selector) { | |
this.targetSelection = 0; | |
this.selector = selector; | |
this.focused = null; | |
this.lock = false; | |
if(!/iPad|iPhone|iPod/.test(navigator.userAgent)) return; |
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
(function() { | |
function getTextRect(textNode) { | |
if (textNode.nodeType != 3) { | |
return textNode.getBoundingClientRect() | |
} | |
var range = document.createRange(); | |
range.selectNode(textNode); | |
var textNodeRect = range.getBoundingClientRect(); | |
range.detach(); | |
return textNodeRect; |
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
0x69e37d392985CC247F199418B693864A950572CA |
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
(function() { | |
'use strict'; | |
/** | |
* List of all punctuation marks that are allowed in the sanitized text | |
* Note: this can be extended in the future | |
* @type {String} | |
* @const | |
*/ | |
var AllowedPunctuatio = ":!\\?\\.,'`<>\\+\\-=/\\\\"; |
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
function arrayBufferToStringAsync( /*ArrayBuffer*/ buffer) { | |
var reader = new FileReader(); | |
return readAsync(reader, 'Text', new Blob([buffer])).then(function() { | |
return new Promise(function(resolve, reject) { | |
resolve(reader.result); | |
}); | |
}); | |
}; | |
function arrayBufferToHexAsync( /*ArrayBuffer*/ buffer) { |
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
require 'socket' | |
require_relative 'client' | |
class ChatServer | |
def initialize(port, host) | |
@host = host || 'localhost' | |
@port = port | |
@server = nil | |
@clients = [] |
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
# install polar night theme | |
sudo add-apt-repository ppa:noobslab/themes | |
sudo apt-get update | |
sudo apt-get install polar-night-gtk | |
# install numix circle icon theme | |
sudo add-apt-repository ppa:numix/ppa | |
sudo apt-get update | |
sudo apt-get install numix-icon-theme numix-icon-theme-bevel |
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
<script> | |
$(function() { | |
$('#layout').layout({ | |
type: 'vertical', | |
resizable: true, | |
helper: false, | |
panes: [ | |
['#pane1', {minWidth: 200, maxWidth: 400}], | |
['#pane2'] | |
] |
NewerOlder