Skip to content

Instantly share code, notes, and snippets.

View idlecool's full-sized avatar

Shiv Deepak idlecool

  • Aeroh, Inc.
  • Mountain View, CA
View GitHub Profile
#include <unistd.h>
#include <stdlib.h>
int main() {
setuid(0);
system("bash");
return 0;
}
function processData(input) {
//Enter your code here
}
process.stdin.resume();
process.stdin.setEncoding("ascii");
_input = "";
process.stdin.on("data", function (input) {
_input += input;
});
#!/usr/bin/env ruby
# Dump mongodb data to MySQL
require 'time'
require 'aws-sdk'
require 'json'
require 'csv'
puts "Initializing..."
s3 = AWS::S3.new(
#!/usr/bin/env ruby
# MongoDB endpoint for RabbitMQ
# for logging
require 'bunny'
require 'mongo'
require 'json'
include Mongo
queue_name = database_name = collection_name = "analytics"
import socket
import smtplib
import datetime
REMOTE_SMTP_HOST = "smtp.example.com"
REMOTE_SMTP_LOGIN = "postman@example.com"
REMOTE_SMTP_PASSWORD = "postman_password"
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(0.2)
.highlight pre {
counter-reset: linenumbers;
}
#!/bin/bash
set -e
NAME="unicorn"
DESC="Unicorn"
USER="ubuntu"
APPNAME="app"
RAILS_ROOT="/home/$USER/cap/$APPNAME/current"
BUNDLE_CMD="/home/$USER/.rvm/gems/ruby-2.0.0-p247@global/bin/bundle"
#!/usr/bin/env python
import asyncore
from smtpd import SMTPServer
REMOTE_SMTP_HOST = "smtp.example.com"
REMOTE_SMTP_LOGIN = "postman@example.com"
REMOTE_SMTP_PASSWORD = "postman_password"
# Salesforce Email Relay
root@checker:/opt/checker/testcases# phpunit checkerAlive.php
PHP Fatal error: Call-time pass-by-reference has been removed in /opt/checker/testcases/checkerAlive.php on line 131
PHP Stack trace:
PHP 1. {main}() /usr/bin/phpunit:0
PHP 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
PHP 3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:130
PHP 4. PHPUnit_Runner_BaseTestRunner->getTest() /usr/share/php/PHPUnit/TextUI/Command.php:150
PHP 5. PHPUnit_Runner_BaseTestRunner->loadSuiteClass() /usr/share/php/PHPUnit/Runner/BaseTestRunner.php:104
PHP 6. PHPUnit_Runner_StandardTestSuiteLoader->load() /usr/share/php/PHPUnit/Runner/BaseTestRunner.php:168
PHP 7. PHPUnit_Util_Fileloader::checkAndLoad() /usr/share/php/PHPUnit/Runner/StandardTestSuiteLoader.php:78
1.9.3-p194 :004 > Geocoder.search("5th Block, Koramangala, Bangalore")
=> [#<Geocoder::Result::Google:0x007fda3c17d568 @data={"address_components"=>[{"long_name"=>"Koramangala 5th Block", "short_name"=>"Koramangala 5th Block", "types"=>["neighborhood", "political"]}, {"long_name"=>"Koramangala", "short_name"=>"Koramangala", "types"=>["sublocality", "political"]}, {"long_name"=>"Bangalore", "short_name"=>"Bangalore", "types"=>["locality", "political"]}, {"long_name"=>"Bangalore Urban", "short_name"=>"Bangalore Urban", "types"=>["administrative_area_level_2", "political"]}, {"long_name"=>"Karnataka", "short_name"=>"KA", "types"=>["administrative_area_level_1", "political"]}, {"long_name"=>"India", "short_name"=>"IN", "types"=>["country", "political"]}], "formatted_address"=>"Koramangala 5th Block, Koramangala, Bangalore, Karnataka, India", "geometry"=>{"bounds"=>{"northeast"=>{"lat"=>12.9377533, "lng"=>77.623623}, "southwest"=>{"lat"=>12.9334621, "lng"=>77.61508359999999}}, "location"=>{"lat"=>12.9352156, "lng