Skip to content

Instantly share code, notes, and snippets.

@zuriby
zuriby / 0 - README.md
Created December 4, 2016 01:56 — forked from JamesMGreene/0 - README.md
A brief example of the latest idea for communicating with PhantomJS from the client-side.

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
@zuriby
zuriby / resume.c
Last active August 29, 2015 14:17 — forked from klange/_.md
#include <stdio.h>
#include <time.h>
/* TODO: resume.h */
typedef struct {
char * company;
char * location;
char * title;
@zuriby
zuriby / config.py
Last active August 29, 2015 14:16
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';
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...
<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
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

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

<div id="share-buttons"></div>
<style type="text/css">
#share-buttons img {
width: 25px;
padding: 5px;
border: 0;
box-shadow: 0;
display: inline;
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import sys
import re
import json
import tornado
import tornado.httpserver
$ curl -v http://www.dailymaily.co.il/
< HTTP/1.1 302 Object moved
< Location: http://www.pc.co.il/dailymaily
$ curl -v http://www.pc.co.il/dailymaily
< HTTP/1.1 301 Moved Permanently
< Location: http://www.pc.co.il/dailymaily/
$ curl -v http://www.pc.co.il/dailymaily/
< HTTP/1.1 301 Moved Permanently