Skip to content

Instantly share code, notes, and snippets.

View Ky6uk's full-sized avatar
🤔
WTF am I doing?

Roman Nuritdinov Ky6uk

🤔
WTF am I doing?
View GitHub Profile
@Ky6uk
Ky6uk / gist:0b227e5421e4c3d00839
Last active August 29, 2015 14:19
Plz wait em all
var whenAll = function (...deferreds) {
var _promises = [];
deferreds.forEach(function (deferred) {
var _deferred = new $.Deferred;
deferred.always(function () {
_deferred.resolve();
});
@Ky6uk
Ky6uk / designer.html
Last active August 29, 2015 14:16
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
var LunRowView = Marionette.ItemView.extend({
tagName: 'tr',
template: _.template('<td>some content</td>')
});
var CollectionView = Marionette.CollectionView.extend({
el: 'raid-row-selector',
childView: LunRowView,
@Ky6uk
Ky6uk / FUCK THE BEELINE.pl
Last active December 27, 2015 10:29
FUCK THE BEELINE
# Some crap of my ferm.conf
table mangle {
chain FORWARD {
# FUCK THE BEELINE
of ppp+ proto tcp tcp-flags (SYN RST) SYN mod tcpmss mss 1421:65496 TCPMSS clamp-mss-to-pmtu;
}
}
@Ky6uk
Ky6uk / block-list
Created September 26, 2012 06:23
./block_counter.sh | sort -n -k2 -r
218.80.254.148 402
60.216.16.204 399
95.111.20.226 320
86.96.194.194 54
165.225.144.182 36
106.187.54.105 24
112.133.210.8 12
111.74.82.33 9
98.126.114.50 6
115.236.99.195 6
@Ky6uk
Ky6uk / blocker_stats.sh
Created September 18, 2012 07:19
Statistic for iptables ssh blocker
#!/bin/bash
declare -A hash
for i in $(zgrep Blocked /var/log/syslog* | awk '{print $12}' | cut -d'=' -f2);
do
if [ ! ${hash[$i]} ];
then
hash[$i]=1
else
@Ky6uk
Ky6uk / i2p.pl
Created January 19, 2012 19:40
infix to postfix
#!/usr/bin/env perl
use strict;
use warnings;
do { print "USAGE: $0 <infix.txt> [postfix.txt]\n"; exit 0 }
unless $ARGV[0];
# output handler
open my $fh_out, '>', ($ARGV[1] || 'postfix.txt') or die $!;