Skip to content

Instantly share code, notes, and snippets.

View jvkumar's full-sized avatar

Jai Kumar jvkumar

  • San Francisco bay area, CA
View GitHub Profile
def symbolize!
convertor =
lambda do |h|
if Hash === h
Hash[
h.map do |k, v|
[k.respond_to?(:to_sym) ? k.to_sym : k, convertor[v]]
end
]
elsif Array === h
<?
$restart_output="";
$status_output="";
$handle = @fopen("./{$server}.txt", "r");
if ($handle) {
while (($buffer = fgets($handle, 4096)) !== false) {
$this_server = trim($buffer);
$restart_output .= system("/var/www/cgi-bin/server_services.bash $this_server restart");
echo "$restart_output";
@jvkumar
jvkumar / quote.json
Last active October 5, 2016 03:06
quote json
IMPORTANT: ALL AMOUNT VALUES (DOLLAR) WILL BE RETURNED IN CENTS
================================================================
{
"_id": "kuhi7fn7n8b7ow827y99w",
"property_id": 22354,
"is_multidimensional": true,
"furnishing_elected_flag": true,
"pet_elected_flag": true,
"parking_elected_flag": true,