This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$server = "localhost"; | |
$port = 11211; | |
/** | |
* Taken directly from memcache PECL source | |
* | |
* http://pecl.php.net/package/memcache | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### | |
# You'll be needing two machines, the target machine and source one (makes sense, right)? | |
##### | |
# On the target machine | |
nc -l 55555 | gzip -d -c | mysql <database name> -u<user> -p<password> [ | <decrypt> ] | |
##### | |
# On the source machine | |
mysqldump -u<user> -p<password> <database name> | gzip | nc <ip of target server> 55555 [ | <encrypt> ] |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 5.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Question" "Answer" "What is Covid-19?" "Disease mofo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from threading import Thread | |
try: | |
import socketserver as SocketServer | |
import http.server as SimpleHTTPServer | |
except ImportError: | |
import SocketServer | |
import SimpleHTTPServer | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import math | |
import random | |
import string | |
random.seed(0) | |
# calculate a random number where: a <= rand < b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql -e "show processlist" | grep -v Rows | grep -v Sleep | grep -oP -A1 "(SELECT|UPDATE|INSERT).*FROM \w+" | sort -h | uniq -c | sort -n |
NewerOlder