Skip to content

Instantly share code, notes, and snippets.

@linar-jether
linar-jether / simple_python_datasource.py
Last active September 10, 2024 19:46
Grafana python datasource - using pandas for timeseries and table data. inspired by and compatible with the simple json datasource ---- Up-to-date version maintained @ https://github.com/panodata/grafana-pandas-datasource
from flask import Flask, request, jsonify, json, abort
from flask_cors import CORS, cross_origin
import pandas as pd
app = Flask(__name__)
cors = CORS(app)
app.config['CORS_HEADERS'] = 'Content-Type'
@plexigras
plexigras / TrList.json
Last active August 8, 2016 22:28
MC|TrList schema
["container", [
{
"name": "windowId",
"type": "i32"
},
{
"name": "trades",
"type":["array",{
"countType":"i8",
"type":["container",[
# Simulate fake processes of analysis sandbox/VM that some malware will try to evade
# This just spawn ping.exe with different names (wireshark.exe, vboxtray.exe, ...)
# It's just a PoC and it's ugly as f*ck but hey, if it works...
# Usage: .\fake_sandbox.ps1 -action {start,stop}
param([Parameter(Mandatory=$true)][string]$action)
$fakeProcesses = @("wireshark.exe", "vmacthlp.exe", "VBoxService.exe",
"VBoxTray.exe", "procmon.exe", "ollydbg.exe", "vmware-tray.exe",
@rauchg
rauchg / README.md
Last active April 13, 2025 04:29
require-from-twitter
@chrismcg
chrismcg / filter_bench.exs
Created March 16, 2016 00:17
Quick elixir benchmark
# in bench/filter_bench.exs
defmodule FilterBench do
use Benchfella
@map (1..1000) |> Enum.map(fn(idx) -> {idx, Integer.to_string(idx)} end) |> Enum.into(%{})
bench "anonymous function" do
Enum.filter(@map, fn {k, _v} -> k > 10 end)
end
@tokhi
tokhi / buergerbot.rb
Last active November 25, 2023 12:01 — forked from pbock/buergerbot.rb
Bürgerbot: Refreshes the Berlin Bürgeramt page until an appointment becomes available, then notifies you.
#!/usr/bin/env ruby
# make sure you the watir gem installed -> gem install watir
require 'watir'
def log (message) puts " #{message}" end
def success (message) puts "+ #{message}" end
def fail (message) puts "- #{message}" end
def notify (message)
success message.upcase
system 'osascript -e \'Display notification Burgerbot with title "%s"\'' % message
rescue StandardError => e
@Johni0702
Johni0702 / restrictions.md
Last active October 11, 2019 16:44
Replay restrictions

Overview

Currently the ReplayMod is banned on quite a few servers. This is due to the fact that the user can move freely through the world. By allowing a server to place restrictions on a replay it might be allowed on more servers. It might also be useful to allow players to add (not remove) these restrictions to any of their replays in the Replay Viewer.

Backwards compatibility

To prevent new restricted replays from being opened in an older version or a replay viewer which doesn't support restricted replays, a Disconnect packet is inserted in the replay. Any replay viewer may only remove this disconnect packet when it fully supports restricted replays or wants to display a custom failure screen. The disconnect message should be Please update to view this replay. (otherwise the packet is ignored). The packet may be sent at any point in time and (obviously) has to be inserted manually by the recorder, not the server. There is nothing else a replay recorder has to

@rom1504
rom1504 / mcprotos_list.md
Last active May 31, 2017 08:44
List of files representing the minecraft protocol
// ==UserScript==
// @name Agar.io Expose Cells
// @match http://agar.io/
// @run-at document-start
// @grant none
// ==/UserScript==
var observer = new MutationObserver(function(mutations) {
for (var i = 0; i < mutations.length; i++) {
if (/^http:\/\/agar\.io\/main_out\.js/.test(mutations[i].addedNodes[0].src)) {
@JeffBelgum
JeffBelgum / list_comprehensions.rs
Created September 26, 2014 00:03
Python list comprehensions in Rust
#![feature(macro_rules)]
/// MIT license etc. etc.
///
/// Experimenting with Python-like list comprehensions.
///
/// An attempt to explore the possibility space for ergonomic improvements
/// in Rust that can come post v1.0. Notice that there are not type declerations.
/// Aside from the "c!" macro invocation, Rust allows for an exact copy of the
/// Python comprehension syntax.