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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int main(int argc, char* argv[]){ | |
//buffer array | |
char buffer[120]; | |
//array for the package name |
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
#include <unistd.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
int main(int argc, char* argv[]){ | |
char buffer; //number of bits copied at once | |
FILE* source = fopen(argv[1],"r"); | |
FILE* dest = fopen(argv[2],"w"); |
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
const char* qextract(char* line) { | |
//get target line with query in it | |
const char* target = textract(line, 0); | |
int len = strlen(target); | |
char mtarget[len+1]; | |
// make a more mallible copy | |
memcpy(mtarget, target,len); |
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
// extract query from request-target | |
const char* temp = qextract(line); | |
int len = strlen(temp); | |
char query[len+1]; | |
// make a usable copy of query | |
strncpy(query, temp,len+1); | |
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
/*--------------------------------------------------------- | |
* Program: recshuffle.cpp | |
* Usage: ./recshuffle | |
*--------------------------------------------------------- | |
* Description: Prints a random permutation of the string | |
* "helloworld" alongside the source string. This program | |
* uses a recursive approach instead of an iterative one | |
*_________________________________________________________ | |
*/ |
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
/*--------------------------------------------------------- | |
* Program: shuffle.cpp | |
* Usage: ./shuffle | |
*--------------------------------------------------------- | |
* Description: Prints a random permutation of the string | |
* "helloworld" alongside the source string | |
*_________________________________________________________ | |
*/ | |
/* INCLUDES */ |
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
/* --------------------------------------- | |
* File: filecpy.cpp | |
* Usage: ./filecpy source destination | |
* --------------------------------------- | |
* Function: Copies the source file to | |
* the new file specified by the path | |
* called destination. The program | |
* creates the new file and then copies | |
* the contents of source to it. | |
* _______________________________________ |
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
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.provision :shell, path: "bootstrap.sh" | |
config.vm.network :forwarded_port, host: 9200, guest: 9200 | |
config.vm.provider "virtualbox" do |v| | |
v.memory = 4000 | |
v.cpus = 2 | |
v.name = "ES-2.4" | |
end | |
end |
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
# install openjdk-7 | |
sudo apt-get purge openjdk* | |
sudo apt-get -y install openjdk-7-jdk | |
# Install elasticsearch | |
wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - | |
echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list | |
sudo apt-get update && sudo apt-get install elasticsearch | |
sudo update-rc.d elasticsearch defaults 95 10 |
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
"" Minimal setting and configuration | |
"" These settings makes editing less of a drag :) | |
"--------------------------------------------------------------------------------- | |
" Use vim settings | |
set nocompatible | |
" changes backspace indentation behavior | |
set backspace=indent,eol,start |
OlderNewer