Skip to content

Instantly share code, notes, and snippets.

View ffr4nz's full-sized avatar
☠️
Doing stuff...

@ffranz ffr4nz

☠️
Doing stuff...
View GitHub Profile
package bolts;
import backtype.storm.task.OutputCollector;
import backtype.storm.task.TopologyContext;
import backtype.storm.topology.OutputFieldsDeclarer;
import backtype.storm.topology.base.BaseRichBolt;
import backtype.storm.tuple.Fields;
import backtype.storm.tuple.Tuple;
import backtype.storm.tuple.Values;
import org.json.JSONArray;
@ffr4nz
ffr4nz / words.txt
Created December 31, 2017 18:12
Multipurpose word list
aardvark
Aarhus
Aaron
ABA
Ababa
aback
abacus
abalone
abandon
abase
@ffr4nz
ffr4nz / randTwitterMention.py
Created December 31, 2017 18:10
Simple python script to tweet including random user mention
#!/usr/bin/python
from twitter import *
import requests
import random
config = {}
execfile("config.py", config)
twitter = Twitter(
auth = OAuth(config["access_key"], config["access_secret"], config["consumer_key"], config["consumer_secret"]))
@ffr4nz
ffr4nz / waze_alert.json
Created August 23, 2017 12:39
Waze alert.
{
"country": "CI",
"nThumbsUp": 2,
"inscale": false,
"comments": [
{
"reportBy": "mauriciozam1",
"reportMillis": 1503491543574,
"isThumbsUp": true
},
@ffr4nz
ffr4nz / json_to_csv_using_stringio.py
Last active March 12, 2017 16:17
Create CSV row using CSV library from JSON Object using StringIO
import csv
import json
import StringIO
'''
Create CSV row using CSV library from JSON Object using StringIO
'''
json_doc = '{"key1":"value1","key2":"value2","key3":"value3"}' # JSON Document as Text
csv_doc_field = ['key1','key2'] # Field to be processed
@ffr4nz
ffr4nz / Neo4jDynamicEntitiesLabel.py
Created June 14, 2016 11:52 — forked from Miguel000/Neo4jEntitiesLabel.py
Neo4jDynamicEntitiesLabel
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2016 sinfonier-project
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@ffr4nz
ffr4nz / Neo4jDynamicRelationUniqueId.py
Last active June 14, 2016 11:08 — forked from Miguel000/Neo4jRelationshipsUniqueId.py
Neo4jDynamicRelationUniqueId
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2016 sinfonier-project
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
/*
The MIT License (MIT)
Copyright (c) 2016 sinfonier-project
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2016 sinfonier-project
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
#!/bin/bash
# Perform installation as root
# Install prereqs
yum -y install libcurl libcurl-devel rrdtool rrdtool-devel rrdtool-perl libgcrypt-devel gcc make gcc-c++
# Get Collectd, untar it, make it and install
wget http://collectd.org/files/collectd-5.4.0.tar.gz
tar zxvf collectd-5.4.0.tar.gz