Skip to content

Instantly share code, notes, and snippets.

View chanakaDe's full-sized avatar
Amor vincit omnia.

Chanu De Silva chanakaDe

Amor vincit omnia.
View GitHub Profile
@chanakaDe
chanakaDe / jwt.json
Last active August 2, 2019 09:12
new jwt generated
{
domain: null,
_events: {},
_eventsCount: 0,
_maxListeners: undefined,
transporter: DefaultTransporter {},
credentials: { refresh_token: 'jwt-placeholder', expiry_date: 1 },
certificateCache: {},
certificateExpiry: null,
certificateCacheFormat: 'PEM',
variable "access_key" {
default = "AKIAT7VMYUEWRXYDXPW2"
}
variable "secret_key" {
default = "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"
}
variable "region" {
default = "us-east-2"
}
variable "vpc_cidr" {
{
first_name: "",
last_name: "",
username: "",
email:"",
password:"",
street_address:"",
city:"",
state:"",
zip_code:"",
AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
# Enable rewrite rules
RewriteEngine on
# Base directory
RewriteBase /education/
@chanakaDe
chanakaDe / .htaccess
Created February 17, 2020 07:33
This is the htaccess for the main domain (www.navigator360.com)
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
$scope.addNewReview = function () {
var fd = new FormData()
for (var i in $scope.files) {
fd.append("review_img", $scope.files[i])
}
fd.append("description", $scope.review.description);
fd.append("date", $scope.review.date);
fd.append("featured", new_featured);
fd.append("email", $scope.review.email);
<div class="form-group">
<label>Wink Image:
<span style="color:red">*</span>
</label>
<input type="file" ng-model-instant id="fileToUpload" onchange="angular.element(this).scope().setFiles(this)" />
</div>
<div class="form-group">
<div>
<div ng-if="progressVisibleMain">
@chanakaDe
chanakaDe / order.json
Last active May 5, 2020 15:51
"items" need to be an array and when you send in the POSt request, need to make it stringify. Call me if you get any issues.
{
"token": "tok_mastercard",
"user_email": "[email protected]",
"full_name": "Chanaka De Silva",
"order_note":"test description",
"items": {{string_items}},
"shipping": {
"line1": "No 5B, Polwatta Road",
"line2": "Gurugoda",
"city": "Horana",
@chanakaDe
chanakaDe / response.json
Created May 5, 2020 15:05
When transaction is success, you will get "status": "paid" AND "status_transitions.paid" : 1588688731.
{
"type": "success",
"code": 200,
"data": {
"id": "or_1GfRiABkM3dAaKZOJIr63AuR",
"object": "order",
"amount": 2799,
"amount_returned": null,
"application": null,
"application_fee": null,
package stubs;
import java.io.IOException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;