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
/*I copied this word for word with the intentions of interpreting it later but i can't figure out what the function copy is doing!*/ | |
#include <stdio.h> | |
#define MAXLINE 1000 /*Maximum Input Line Length*/ | |
int getline(char s[],int lim); | |
void copy(char to[],char from[]); | |
int main() { | |
int len; /*Current line length*/ | |
int max; /*maximum length seen so far*/ | |
char line[MAXLINE]; /*current input line*/ |
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
package me.bevilacqua.game; | |
import java.awt.Canvas; | |
import java.awt.Color; | |
import java.awt.Dimension; | |
import java.awt.Graphics; | |
import java.awt.image.BufferStrategy; | |
import java.awt.image.BufferedImage; | |
import java.awt.image.DataBufferInt; |
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 <string.h> | |
void find_variants(char *input, char* working, int size); | |
void bin_str_func(char *input); | |
int main(int argc, char *argv[]) | |
{ | |
bin_str_func(argv[1]); | |
return 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
$(function() { | |
alert("DOM loaded"); | |
parseHTML(); | |
}); | |
function parseHTML() { | |
var words = {}; | |
var conent = ""; | |
content = $('body').html(); | |
alert(content); |
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
# Use Ubuntu as os | |
FROM ubuntu:16.04 | |
# Passed Environment variables | |
ARG GIT_USERNAME | |
ARG GIT_TOKEN | |
# Packages & Environment Variables | |
ENV SRP_ROOT /Serpico | |
ENV GEM /usr/local/rvm/rubies/ruby-2.1.5/bin/gem |
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
1. ```sudo yum update -y``` | |
2. ```sudo yum install -y docker``` | |
3. ```sudo service docker start``` | |
4. ```sudo usermod -a -G docker ec2-user``` | |
5. Log out of SSH and Log back in | |
6. Verify ec2-user can run docker commands with ```docker info``` | |
7. Bring in Docker file ```curl https://gist.githubusercontent.com/Bevilacqua/5754480c2af1e1d222b93c82402533f7/raw/0857a0b2f4d7047ed5525de46b86c7e70b312375/Dockerfile > Dockerfile``` | |
8. Build a docker image ```docker build --build-arg GIT_USERNAME=INSERT-USERNAME --build-arg GIT_TOKEN=INSERT-TOKEN --no-cache -t serpico .``` | |
9. Launch the server ```docker run -it -p 443:8443 serpico``` | |
10. NOTE: USE HTTPS PROTOCOL |
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 | |
if [ $# -lt 2 ] | |
then | |
echo "Usage: ./serpico_setup GIT_USERNAME GIT_PASSWORD" | |
exit | |
fi | |
curl https://gist.githubusercontent.com/Bevilacqua/5754480c2af1e1d222b93c82402533f7/raw/Dockerfile > Dockerfile | |
docker build --build-arg GIT_USERNAME=$1 --build-arg GIT_TOKEN=$2 --no-cache -t serpico . | |
clear | |
read -r -p "Would you like to initialize the db. If you choose no you should have a db/master.db in the current directory. [y/N] " response |
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
set -e | |
instanceCount=`docker ps -q | wc -l`; | |
if [[ "$instanceCount" != "0" ]] | |
then | |
docker kill $(docker ps -q) | |
fi | |
if [[ "$1" == "--force" ]] |
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
15 03 * * * sudo /home/ec2-user/certbot-auto renew --pre-hook 'docker kill $(docker ps -q)' --post-hook 'sudo /bin/cp -rL /etc/letsencrypt/live/reporting.hacklabs.com/. /home/ec2-user/db/certs --remove-destination; sudo sh /home/ec2-user/deploy_serpico.sh --force' --debug | |
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
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.bundle.min.js"></script> | |
</head> | |
<body> | |
<canvas id="myChart" width="450" height="200"></canvas> | |
<script> | |
var androidData = [ | |
{x: 1, y: .1}, | |
{x: 2, y: .2}, |
OlderNewer