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
// ==UserScript== | |
// @name Remove idiotic dropdown menu when typing in telegram | |
// @namespace http://your.homepage/ | |
// @version 0.1 | |
// @description enter something useful | |
// @author You | |
// @match https://web.telegram.org/* | |
// @match https://web.telegram.org/*/* | |
// @grant none | |
// ==/UserScript== |
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
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts, | |
that detects and handles AJAXed content. | |
Usage example: | |
waitForKeyElements ( | |
"div.comments" | |
, commentCallbackFunction | |
); |
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
module SocketPolicyServer | |
type TcpListener = System.Net.Sockets.TcpListener | |
type IPAddress = System.Net.IPAddress | |
type HttpListenerRequest = System.Net.HttpListenerRequest | |
open System.Threading.Tasks | |
open System.Threading | |
let StartPolicyServer (gamePort:int) (policyServerPort:int) = |
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
module SocketPolicyServer | |
type HttpListener = System.Net.HttpListener | |
type HttpListenerRequest = System.Net.HttpListenerRequest | |
let StartPolicyServer (port:int) = | |
if not HttpListener.IsSupported then | |
failwith "HttpListener not supported" | |
else |
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
mockery = (func) -> | |
mocks = [{f: func}] | |
ret = () -> | |
mock = mocks[0] | |
unless mock | |
throw new Error('No mocks left') | |
unless mock.forever | |
mocks.splice(0, 1) | |
return mock.f.apply @, arguments |
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
grammar negationtest; | |
expression: ar_expression { System.out.println($ar_expression.ret); } | |
; | |
ar_expression returns [Integer ret]: | |
a = mult_expression { $ret = $a.ret; } | |
( | |
('+' b = mult_expression { $ret += $b.ret; } ) | | |
('-' c = mult_expression { $ret -= $c.ret; } ) |
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
/* | |
Copyright (C) 1996 John W. Eaton | |
This file is part of Octave. | |
Octave is free software; you can redistribute it and/or modify it | |
under the terms of the GNU General Public License as published by the | |
Free Software Foundation; either version 2, or (at your option) any | |
later version. |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <Python.h> | |
static PyObject* rettest(PyObject *self, PyObject *args) | |
{ | |
return Py_BuildValue("i", 123); | |
} |
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
close all; | |
sampling_freq = 8000; | |
nyq_freq = sampling_freq / 2; | |
% Bandpass filter frequencies | |
freqs = [41 82 123]; | |
for i=1:10 | |
fsize = size(freqs, 2); | |
freqs = [freqs (freqs(fsize-1)*2)]; |
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
#define WIN32_LEAN_AND_MEAN | |
#include <Windows.h> | |
#include <portaudio.h> | |
#include <assert.h> | |
#include <stdio.h> | |
#include <math.h> | |
#define NUM_CHANNELS 2 |