Fork me on GitHub
#off-topic
<
2016-03-21
>
borkdude10:03:06

can someone give a hint how I can pipe something into grep and when it finds the first line, kill the thing that pipes?

borkdude10:03:45

I want to do this: kafkacat -C -t some-topic -b kafka:9092 -c 105000 | grep "CwRR9yQpPxtgBgBDATsbMKo="

borkdude10:03:06

kafkacat keeps running, but it can be killed when grep finds one line

swizzard10:03:10

@borkdude: i think the answer involves xargs

conormcd10:03:24

@borkdude: | grep -q "your string" should do what you want.

borkdude11:03:04

grep -m 1 "my string" turned out to be what I wanted

urbanslug12:03:03

Clojurians is being “slow” today, are people not awake or something?

doddenino12:03:31

busy day at work for me

meow15:03:20

I'm ready for a spine-tingler.

jumar16:03:37

@swizzard: Did you solve your issues with SSL certificates?

swizzard16:03:59

i just gave up and wrote the scraping stuff in python

jumar16:03:36

huh, I remember there can be many cacerts locations and sometimes it’s not obvious which one is used

jumar16:03:49

you can try “locate cacerts” to find all cacerts on your system

jumar16:03:59

at worst, it’s possible to import it everywhere

swizzard16:03:39

i wasn’t running the locate daemon, apparently

swizzard16:03:47

now i’m waiting for the database to get generated

meow16:03:58

@clojuregeek: Found some doods for you to help. ^

meow16:03:43

Nola has experience with screen-scraping in Clojure.

swizzard16:03:19

hey what now

meow16:03:59

Hopefully @clojuregeek will come here and help you out.

swizzard16:03:06

that’d be great

swizzard16:03:28

i located all the cacerts

meow16:03:32

She isn't subscribed to #C03RZGPG3 but I invited her.

swizzard16:03:57

the only one that looks relevant is /Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/security/cacerts

swizzard16:03:32

but i spent some time trying to export certs from chrome and add them to that one via keytool

jumar16:03:27

@swizzard: you might want to import certificate for the site that causes the issues

jumar16:03:41

otherwise, the default certificates should be fine

meow16:03:44

@swizzard: Join #C082PRKPT if you want Nola's advice.

meow16:03:15

Never mind, she's here.

jumar16:03:17

however, you might encounter some subtle errors like some sites are not sending the intermediate certificates which is something that is solved out-of-the box by browsers, but not in java / http client

swizzard16:03:24

chrome loads the site just fine

swizzard16:03:27

that’s the thing

swizzard16:03:50

@jumar that might be the problem

swizzard16:03:53

any suggestions?

meow16:03:15

@clojuregeek: Can you help with this problem?

jumar16:03:34

@swizzard: not really - these sites doesn’t implement standard correctly, but unfortunately it’s quite common

swizzard16:03:49

python’s requests lib handles it fine

jumar16:03:50

I remember that we implemented custom downloader for intermediate certificates in my previous company

jumar16:03:04

it might be that you have turned of certificate verification completely

jumar16:03:15

however, i don’t know python

swizzard16:03:30

is there a way to disable cert verification in clj-http?

jumar16:03:56

;; Need to contact a server with an untrusted SSL cert? (client/get "https://alioth.debian.org" {:insecure? true})

jumar16:03:12

Needles to say: it’s certainly not recommended 😉

swizzard16:03:32

i’ve written most of it in python already 😞

jumar17:03:18

well, it’s up to you - however, this knowledge might be useful in the future. It’s not the first time I heard about this issue

swizzard17:03:28

i do appreciate it

swizzard17:03:43

{:insecure? true} didn’t fix it 😞

borkdude19:03:05

Does anyone know a CRUD as a service, so users can enter data and I can get it from there, only to display it in html? I'd like to make a simple form and just read the data that was collected and render it

jumar19:03:09

@swizzard: just curious - can you give me the server url which you are trying to crawl (if it’s public). I’d like to try it and see if the same issue happens to me

juhoteperi20:03:40

Linux graphics stack (or at least Nvidia driver) just took nice step forward: http://www.phoronix.com/scan.php?page=news_item&amp;px=NVIDIA-364.12-Linux