Skip to content

Instantly share code, notes, and snippets.

Avatar

ikosuave vanjos

View GitHub Profile
View english_school_faq.csv
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 5.
Question,Answer
How does Covid-19 spread?,"The virus is thought to spread mainly from person-to-person. Between people who are in close contact with one another (within about 6 feet). Through respiratory droplets produced when an infected person coughs or sneezes. These droplets can land in the mouths or noses of people who are nearby or possibly be inhaled into the lungs."
What is Covid-19?,"It's a pandemic and disease"
"How does COVID19, Coronavirus spread from person to person?","The virus is thought to spread mainly from person-to-person. Between people who are in close contact with one another (within about 6 feet). Through respiratory droplets produced when an infected person coughs or sneezes. These droplets can land in the mouths or noses of people who are nearby or possibly be inhaled into the lungs."
Can someone spread the virus without being sick?,"People are thought to be most contagious when they are most symptomatic (the sickest).Some spread might be possible before people show symptoms; there h
View faq-tabs.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
"Question" "Answer" "What is Covid-19?" "Disease mofo"
@vanjos
vanjos / proxy.py
Created Jun 3, 2018 — forked from Kalimaha/proxy.py
Simple Proxy server in Python
View proxy.py
import time
from threading import Thread
try:
import socketserver as SocketServer
import http.server as SimpleHTTPServer
except ImportError:
import SocketServer
import SimpleHTTPServer
@vanjos
vanjos / ccm_eth_alias_listener.sh
Last active Aug 29, 2015
A quick and dirty CCM ethernet aliasing program
View ccm_eth_alias_listener.sh
#!/bin/bash
# -------------------------------------
# Quick and dirty to set up cassandra
# CCM with alias'ed ethernet addresses
# -------------------------------------
#
# ===== #
# ARGS #
@vanjos
vanjos / stargate.md
Last active Aug 29, 2015
Stargate Explained (Lucene indexing ON Cassandra) to replace Lucandra/Solandra and SOLR (from DSE)
View stargate.md

STARGATE INSTALL

  • Prerequisites
  • ubuntu
  • java 1.7
  • likely want openjdk-7-jre-headless openjdk-7-jre-lib openjdk-7-jdk
@vanjos
vanjos / kafka-upstart.conf
Created Feb 10, 2014
Upstart script for Kafka
View kafka-upstart.conf
description "Kafka Broker"
start on runlevel [2345]
stop on starting rc RUNLEVEL=[016]
respawn
respawn limit 2 5
env CONFIG_HOME="/etc/kafka"
env KAFKA_HOME="/usr/lib/kafka"
@vanjos
vanjos / get_memcache_keys.php
Created Oct 16, 2013
Get ALL keys from memcache using PHP
View get_memcache_keys.php
<?php
$server = "localhost";
$port = 11211;
/**
* Taken directly from memcache PECL source
*
* http://pecl.php.net/package/memcache
*
*/
@vanjos
vanjos / ec2metadata_creator.php
Created Aug 28, 2013
Set up ec2metata_constants.php
View ec2metadata_creator.php
<?php
/**
* This script gets EC2 metadata and saves it to an ini file. It should be run
* on boot before starting application stuff, such as php-fpm or video
* processing.
*/
// path to put file
$path = '/usr/local/viafoura';
@vanjos
vanjos / Running_query_volume.sh
Created Aug 28, 2013
Find the volume of running MySQL queries. Helps nail down what gets run a lot in a high-volume system
View Running_query_volume.sh
mysql -e "show processlist" | grep -v Rows | grep -v Sleep | grep -oP -A1 "(SELECT|UPDATE|INSERT).*FROM \w+" | sort -h | uniq -c | sort -n
@vanjos
vanjos / ccm_cassandra.sh
Last active Dec 20, 2015
CCM Installation to have the stack work FAST
View ccm_cassandra.sh
#!/bin/bash
###
#
# Find out which ami to use on http://www.alestic.com
#
# at the time of this writing, Ubuntu 12.04 (Precise) was ami-23d9a94a
# with EBS boot
#
# In order for this to work, tuned your firewall for the following: