Skip to content

Instantly share code, notes, and snippets.

View paingsoethaw's full-sized avatar

Paing Soe Thaw paingsoethaw

View GitHub Profile
<?php
$S = "One last question:
Bob needs to determine if Jane knows his phone number by passing a written note through Alice.
However, Alice must never know Bob's phone number.
how Bob can determine if Jane has his phone number?";
$result = preg_replace("/ /", "@", $S);
print $result;
?>
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
var td_class_value = $( "td.property" ).data("value");
alert(td_class_value);
});
</script>
file = "public/to_be_uploaded.txt"
file_path = Rails.root.join(file)
local_file = File.open(local_file_path)
bucket_name = "BUCKET_NAME"
s3 = AWS::S3.new(
:access_key_id => "KEY",
:secret_access_key => "SECRET_ACCESS_KEY",
:s3_endpoint => "S3_ENDPOINT"
)