Skip to content

Instantly share code, notes, and snippets.

View berezovskyi's full-sized avatar

Andrew Berezovskyi berezovskyi

View GitHub Profile
@berezovskyi
berezovskyi / twitspam.js
Created February 2, 2014 13:29
Reports all tweets within a tweet stream. Paste it into console tab of your browser's developer tools.
console.log = console.__proto__.log; var tok=$("#signout-form .authenticity_token").val(); jQuery(".stream-item").map( function() { var id=jQuery(this).attr("data-item-id"); var tweet = jQuery(this).find(".tweet"); return {"tweet_id": id, "user_id": tweet.attr("data-user-id"), "screen_name": tweet.attr("data-screen-name"), "report_type": "spam", "block_user": true, "authenticity_token": tok}; } ).each(function(){jQuery.post("https://twitter.com/i/tweet/report", this, function(d){console.log(d);})});
<! DOCTYPE html>
<%@page import="com.google.appengine.datanucleus.query.*"%>
<%@page import="java.util.*"%>
<%@page import="com.google.appengine.api.datastore.*"%>
<%@page import="com.google.appengine.repackaged.com.google.api.client.util.store.DataStore"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.google.appengine.api.users.*" %>
<%@ page import="com.google.common.html.HtmlEscapers" %> <!-- Guava -->
<html><body>
root@beaglebone:~/tub-doorflirt/sample# sleep 2 && ./raspberry_pi_capture && ./show_ascii
spi mode: 0
bits per word: 8
max speed: 16000000 Hz (16000 KHz)
Calculating min/max values for proper scaling...
maxval = 8314
minval = 7853
........... ..,;c
.............. ..',codk0
............... ....,;cox0K0Ox
@berezovskyi
berezovskyi / test.txt
Last active August 29, 2015 14:15
test
In the late 1980s, Stuart GraBois, a federal prosecutor in New York, had become obsessed with the disappearance of a 6-year-old boy named Etan Patz. GraBois had worked with the Manhattan boy’s parents, interviewed police investigators and developed a theory: The boy, who had gone missing while on the way to school one morning in 1979, had been abducted and killed by a convicted pedophile named Jose Ramos.
It was not an outlandish notion. Ramos, it turned out, had been a onetime boyfriend of Patz’s regular babysitter. He could well have known the boy’s route to school. And he had a record of abusing young children.
GraBois, as part of his pursuit, came to work with an informant in the New York prison where Ramos was an inmate. Get him to tell you what he did to the boy, GraBois told the informant. Figure out what he had done with the boy’s body, which had never been found.
And so the informant, a man named Jack Colbert who was imprisoned on a fraud conviction, soon got to work at the federal facility in Otisvi
@berezovskyi
berezovskyi / create.sql
Last active August 29, 2015 14:16
PostgreSQL compatible
CREATE table Questions (
ID SERIAL,
QUESTION varchar (300) NOT NULL,
PRIMARY KEY (ID)
);
CREATE table Answers (
ID SERIAL,
QID integer NOT NULL,
ANSWER varchar (300) NOT NULL,
@berezovskyi
berezovskyi / heroku.sh
Created March 10, 2015 01:16
Default heroku addons
heroku addons:add heroku-postgresql
heroku addons:add pgbackups
heroku addons:add papertrail
heroku addons:add rollbar
heroku addons:add mailgun
heroku addons:add codeship
@berezovskyi
berezovskyi / deneb.log
Created March 16, 2015 17:51
demo -vms run
This file has been truncated, but you can view the full file.
andrij@deneb ~ $ sudo tail -f /var/log/messages
Mar 16 18:13:44 deneb sshd[2300]: pam_unix(sshd:session): session opened for user andrij by (uid=0)
Mar 16 18:13:44 deneb sshd[2304]: SSH: Server;Ltype: Kex;Remote: 192.168.4.200-47659;Enc: aes128-ctr;MAC: hmac-md5-etm@openssh.com;Comp: none
Mar 16 18:14:08 deneb sshd[2317]: SSH: Server;Ltype: Version;Remote: 192.168.4.200-47660;Protocol: 2.0;Client: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
Mar 16 18:14:08 deneb sshd[2317]: SSH: Server;Ltype: Kex;Remote: 192.168.4.200-47660;Enc: aes128-ctr;MAC: hmac-md5-etm@openssh.com;Comp: none [preauth]
Mar 16 18:14:08 deneb sshd[2317]: SSH: Server;Ltype: Authname;Remote: 192.168.4.200-47660;Name: andrij [preauth]
Mar 16 18:14:08 deneb sshd[2317]: Accepted publickey for andrij from 192.168.4.200 port 47660 ssh2: RSA 45:6e:35:69:68:68:9d:be:51:8e:13:b7:9e:4c:37:06
Mar 16 18:14:08 deneb sshd[2317]: pam_unix(sshd:session): session opened for user andrij by (uid=0)
Mar 16 18:14:08 deneb sshd[2323]: SSH: Server;Ltype: Kex;Remote: 192.168.
Mar 16 18:55:07 deneb kernel: [ 730.426766] [OSPJ c=2499] ospj_calc_time_slice()
Mar 16 18:55:07 deneb kernel: [ 730.426775] pid 2499 share 10 ts 2
Mar 16 18:55:07 deneb kernel: [ 730.426779] Remaining available bw 80 percent
Mar 16 18:55:07 deneb kernel: [ 730.426783] [OSPJ] SUCCESS - Task's class & share updated successfully to VMS
Mar 16 18:55:07 deneb kernel: [ 730.426787] [OSPJ c=2499] set_curr_task_ospj()
Mar 16 18:55:07 deneb kernel: [ 730.426791] [OSPJ] enqueue(): add 2499, nr_running = 1
Mar 16 18:55:07 deneb kernel: [ 730.426798] [OSPJ c=2499] update_curr_ospj()
Mar 16 18:55:07 deneb kernel: [ 730.426802] [OSPJ] check_preempt_curr_ospj(); // old: 2499; new: 2499
Mar 16 18:55:07 deneb kernel: [ 730.426808] [OSPJ c=2499] put_prev_task_ospj()
Mar 16 18:55:07 deneb kernel: [ 730.426811] [OSPJ c=2499] update_curr_ospj()
@berezovskyi
berezovskyi / deneb.log
Created March 16, 2015 21:36
10 thread crash
Mar 16 22:31:04 deneb kernel: [ 4629.308116] [OSPJ c=27159] ospj_calc_time_slice()
Mar 16 22:31:04 deneb kernel: [ 4629.308125] pid 27159 share 10 ts 2
Mar 16 22:31:04 deneb kernel: [ 4629.308129] Remaining available bw 50 percent
Mar 16 22:31:04 deneb kernel: [ 4629.308133] [OSPJ] SUCCESS - Task's class & share updated successfully to VMS
Mar 16 22:31:04 deneb kernel: [ 4629.308137] [OSPJ c=27159] set_curr_task_ospj()
Mar 16 22:31:04 deneb kernel: [ 4629.308141] [OSPJ] enqueue(): add 27159, nr_running = 1
Mar 16 22:31:04 deneb kernel: [ 4629.308164] [OSPJ c=27159] update_curr_ospj()
Mar 16 22:31:04 deneb kernel: [ 4629.308168] [OSPJ] check_preempt_curr_ospj(); // old: 27159; new: 27159
Mar 16 22:31:04 deneb kernel: [ 4629.308175] [OSPJ c=27159] put_prev_task_ospj()
Mar 16 22:31:04 deneb kernel: [ 4629.308179] [OSPJ c=27159] update_curr_ospj()
@berezovskyi
berezovskyi / build.log
Last active August 29, 2015 14:19
GMP 6.0 build with clang
andrew@zenbook ~/.../gmp/gmp-6.0 02:20 [127] $ make
clang `test -f 'gen-fac.c' || echo './'`gen-fac.c -o gen-fac
./gen-fac 64 0 >fac_table.h || (rm -f fac_table.h; exit 1)
clang `test -f 'gen-fib.c' || echo './'`gen-fib.c -o gen-fib
./gen-fib header 64 0 >fib_table.h || (rm -f fib_table.h; exit 1)
./gen-fib table 64 0 >mpn/fib_table.c || (rm -f mpn/fib_table.c; exit 1)
clang `test -f 'gen-bases.c' || echo './'`gen-bases.c -o gen-bases -lm
./gen-bases header 64 0 >mp_bases.h || (rm -f mp_bases.h; exit 1)
./gen-bases table 64 0 >mpn/mp_bases.c || (rm -f mpn/mp_bases.c; exit 1)
clang `test -f 'gen-trialdivtab.c' || echo './'`gen-trialdivtab.c -o gen-trialdivtab -lm