Skip to content

Instantly share code, notes, and snippets.

View apeeyush's full-sized avatar

Peeyush Agarwal apeeyush

View GitHub Profile
@apeeyush
apeeyush / bash.sh
Last active August 29, 2015 14:05
PHP CS252
sudo apt-get install apache2
netstat -an | more
cd /var/www
sudo apt-get install libapache2-mod-php5
sudo apt-get install php5-mysql
@apeeyush
apeeyush / script.sh
Created August 11, 2014 13:40
Download lectures from cse homepages
scp -rp peeyushag@turing.cse.iitk.ac.in:/homepages/global/path-to-folder ~/acads/
@apeeyush
apeeyush / script.sh
Last active August 29, 2015 14:04
AWS OpsWorks
TODO : Add a Javascript RunTime
passenger-config --detect-apache2
sudo yum -y install nodejs
sudo tac /var/log/httpd/error.log | less
cd /srv/www/webcam_app/current/
sudo bundle exec rake db:migrate RAILS_ENV=production
sudo tac log/production.log | less
sudo tac /var/log/httpd/error.log | less
sudo gem update rake
@apeeyush
apeeyush / update.rb
Created July 7, 2014 11:46
Ruby Script for Geniverse
Log.all.where(application: 'Geniverse').where(event: 'User logged in').each do |log|
username = log.parameters["username"]
session = log.session
Log.where(session: session).update_all(username: username)
end
@apeeyush
apeeyush / script.sh
Created July 6, 2014 12:06
Posting data via terminal
cat <Path to File Containg JSON Data> | curl -H "Content-Type: application/json" -d @- <POST Request URL>

Proposed format for specifying synthetic data

This file should be edited freely.

Scenario: Find an event with a value

In this scenario, we want to see if the event "Score" ever happens with the property "{points_earned: 10}" in the properties hash. If we find one, we want to add a new event, "User scored max points".

@apeeyush
apeeyush / Test Gist
Created May 3, 2014 15:04
Test Gist : Public
Test Gist