Skip to content

Instantly share code, notes, and snippets.

Tzury Bar Yochay tzuryby

Block or report user

Report or block tzuryby

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tzuryby
tzuryby / aggregate-cidr-addresses.pl
Created Aug 30, 2018 — forked from denji/aggregate-cidr-addresses.pl
Take a list of CIDR address blocks and combine them, for example, 192.168.0.0/24 and 192.168.1.0/24 gives 192.168.0.0/23. I usually use "list-iana-reserved-ranges | aggregate-cidr-addresses" to get a list of blocks to not report with firewall log processing. https://github.com/job/aggregate6
View aggregate-cidr-addresses.pl
#!/usr/bin/perl
#
# aggregate-cidr-addresses - combine a list of CIDR address blocks
# Copyright (C) 2001,2007 Mark Suter <suter@zwitterion.org>
#
# This program 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 3 of the License, or
# (at your option) any later version.
#
@tzuryby
tzuryby / 0 - README.md
Created Dec 4, 2016 — forked from JamesMGreene/0 - README.md
A brief example of the latest idea for communicating with PhantomJS from the client-side.
View 0 - README.md

A brief example of the latest idea for communicating with PhantomJS from the client-side.

This is the next revision of ideas discussed in a previous Gist:
    https://gist.github.com/JamesMGreene/3716654

This example demonstrates shimming in the new communication channels under discussion via existing methods (WebPage#onCallback and window.callPhantom).

The example does, however, take advantage of a yet-to-be-implemented EventEmitter API for core modules in the PhantomJS outer context. This API would add the following methods to core modules as appropriate:

  • on / addEventListener
@tzuryby
tzuryby / resume.c
Last active Aug 29, 2015 — forked from klange/_.md
View resume.c
#include <stdio.h>
#include <time.h>
/* TODO: resume.h */
typedef struct {
char * company;
char * location;
char * title;
@tzuryby
tzuryby / config.py
Last active Aug 29, 2015
config.py
View config.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
#config for haaretz premium checks
#host to check
#edgecast
# host = '93.184.219.20';
#Akamai
host = '82.166.201.147';
View gist:d5a025d201e989aff741
mbp:~ tzury$ curl -v http://images4.engageya.com/05/d8/website_93720/53/fd/d2/grazeit.com.Couple_LowSavings_200x200_133965_1.jpg > /dev/null
* Adding handle: conn: 0x7fbf0b80b600
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fbf0b80b600) send_pipe: 1, recv_pipe: 0
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* About to connect() to images4.engageya.com port 80 (#0)
* Trying 94.31.29.229...
View gist:0005e8df24f569fb09ef
<html xmlns="http://www.w3.org/1999/xhtml" dir="rtl">
<head id="ctl00_Head1">
<base href="http://www.prima.co.il/" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /><meta name="ROBOTS" content="NOINDEX, NOFOLLOW" /><meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=yes,minimum-scale=1,maximum-scale=1" /><meta name="author" content="Prima Hotel" /><meta name="rating" content="general" /><meta name="generator" content="Prima Hotels" /><meta name="audience" content="all" /><meta name="category" content="hotel" /><meta name="copyright" content="Hotels E-Commerce - SilverTravel Ltd." /><meta name="distribution" content="Global" /><meta name="page-topic" content="hotel" /><meta name="resource-type" content="document" /><link rel="shortcut icon" href="favicon1.ico" type="image/x-icon" />
<script src="Scripts/BookingEngine/SecureCommon.js" type="text/javascript"></script>
<script src="Scripts/BookingEngine/EngineDatePicker.js" type="text/javascript"></sc
View 2048.c
M[16],X=16,W,k;main(){T(system("stty cbreak")
);puts(W&1?"WIN":"LOSE");}K[]={2,3,1};s(f,d,i
,j,l,P){for(i=4;i--;)for(j=k=l=0;k<4;)j<4?P=M
[w(d,i,j++)],W|=P>>11,l*P&&(f?M[w(d,i,k)]=l<<
(l==P):0,k++),l=l?P?l-P?P:0:l:P:(f?M[w(d,i,k)
]=l:0,++k,W|=2*!l,l=0);}w(d,i,j){return d?w(d
-1,j,3-i):4*i+j;}T(i){for(i=X+rand()%X;M[i%X]
*i;i--);i?M[i%X]=2<<rand()%2:0;for(W=i=0;i<4;
)s(0,i++);for(i=X,puts("\e[2J\e[H");i--;i%4||
puts(""))printf(M[i]?"%4d|":" |",M[i]);W-2
View Basecamp-DDOS.md

Basecamp was under network attack

The attack detailed below has stopped (for the time being) and almost all network access for almost all customers have been restored. We're keeping this post and the timeline intact for posterity. Unless the attack resumes, we'll post a complete postmortem within 48 hours (so before Wednesday, March 26 at 11:00am central time).

Criminals have laid siege to our networks using what's called a distributed denial-of-service attack (DDoS) starting at 8:46 central time, March 24 2014. The goal is to make Basecamp, and the rest of our services, unavailable by flooding the network with bogus requests, so nothing legitimate can come through. This attack was launched together with a blackmail attempt that sought to have us pay to avoid this assault.

Note that this attack targets the network link between our servers and the internet. All the data is safe and sound, but nobody is able to get to it as long as the attack is being successfully executed. This is like a bunch of people

View gist:6230282
<div id="share-buttons"></div>
<style type="text/css">
#share-buttons img {
width: 25px;
padding: 5px;
border: 0;
box-shadow: 0;
display: inline;
View gist:5385889
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import sys
import re
import json
import tornado
import tornado.httpserver
You can’t perform that action at this time.