Skip to content

Instantly share code, notes, and snippets.

View raven428's full-sized avatar

Dmitry Sukhodoyev raven428

View GitHub Profile
#!/usr/bin/env perl
#
# $Id: ms-classless-routes-decoder.pl,v 1.2 2017/10/10 05:59:07 raven Exp $
#
use strict;
use warnings;
my $in = $ARGV[0];
my @in = split(/:/, $in);
foreach(@in) { $_ = hex($_); }
my @routes = ();
@raven428
raven428 / transmission-2_92-multiplier22.diff
Created May 20, 2017 12:48
transmission 2.92 upload announce multiplier
diff -ru transmission-2.92.orig/libtransmission/announcer-http.c transmission-2.92/libtransmission/announcer-http.c
--- transmission-2.92.orig/libtransmission/announcer-http.c 2017-05-20 12:31:31.131471000 +0000
+++ transmission-2.92/libtransmission/announcer-http.c 2017-05-20 12:32:24.550275000 +0000
@@ -80,7 +80,7 @@
escaped_info_hash,
PEER_ID_LEN, PEER_ID_LEN, req->peer_id,
req->port,
- req->up,
+ req->up*22,
req->down,
#!/bin/sh
#
# PROVIDE: munin-node
# REQUIRE: DAEMON
# BEFORE: cron
# KEYWORD: shutdown
. /etc/rc.subr
name=munin_node
@raven428
raven428 / don't ask to ask, just ask
Last active July 5, 2020 12:31
Спрашивайте сразу
Вам отправили это сообщение по следующим возможным причинам.
* Вы поприветствовались и ждете ответа.
* Вы спросили о том, можно ли задать вопрос, и ждете ответа.
* Вы скинули запрос авторизации и ждете ответа.
Пожалуйста, не делайте так. Задавайте вопрос сразу, без прелюдий, без запросов авторизации, и ждите ответа. Не повторяйте свой вопрос и не спрашивайте, на месте ли я.
#!/bin/bash
#
# Copyright (c) 2014, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright