Skip to content

Instantly share code, notes, and snippets.

View sadhasivam's full-sized avatar

sadhasivam sadhasivam

  • SR INC
  • ChesterSprings PA
View GitHub Profile
@sadhasivam
sadhasivam / encryp_decrypt.php
Created December 21, 2015 20:03
encryp_decrypt.php
<?php
class ShopRunnerCrypt {
protected $config;
public function __construct(array $parameters = []) {
$this->config = $parameters;
}
/**
@sadhasivam
sadhasivam / simple_gin_http.go
Last active February 22, 2016 04:34
simple_gin.go
package main
import (
"net"
"time"
"github.com/gin-gonic/gin"
)
func rootHandler(context *gin.Context) {
package future
// A Future represents the result of some asynchronous computation.
// Future returns the result of the work as an error, or nil if the work
// was performed successfully.
// Implementers must observe these invariants
// 1. There may be multiple concurrent callers, or Future may be called many
// times in sequence, it must always return the same value.
// 2. Future blocks until the work has been performed.
type Future func() error
input = "DJJGKHG HBMBEBIBFBF HBMBQDK HBMBTDH HBMBEBIBFBF HBNGKHG"
line_id = input.split(" ")
image_string = ""
for row in line_id:
index = 0
for c in row:
rle = ord(c) - 64
if index%2 == 0:
Any SSO Login Hard Login Chrome iPhone IE HTTP HTTPS
1800BASKETS SSO Login Hard Login Chrome iPhone IE HTTPS
ADIDAS Hard Login Chrome iPhone HTTPS
AEGL Hard Login Chrome IE
AGJEANS SSO Login Hard Login Chrome iPhone IE HTTPS
AHAVA SSO Login Hard Login Chrome iPhone IE HTTPS
AUZN SSO Login Hard Login Chrome iPhone IE HTTPS
AVON SSO Login Hard Login Chrome iPhone IE HTTPS
BBEAR SSO Login Hard Login Chrome iPhone IE HTTPS
@sadhasivam
sadhasivam / tls_check.sh
Created August 9, 2016 02:08
TLS Check
nmap --script ssl-enum-ciphers -p 443 shoprunner.com
`
Starting Nmap 7.01 ( https://nmap.org ) at 2016-08-08 22:07 EDT
Nmap scan report for shoprunner.com (23.13.181.40)
Host is up (0.015s latency).
rDNS record for 23.13.181.40: a23-13-181-40.deploy.static.akamaitechnologies.com
PORT STATE SERVICE
443/tcp open https
| ssl-enum-ciphers:
| TLSv1.1:
@sadhasivam
sadhasivam / api_gateway.v
Created December 19, 2016 21:45
api gateway to kinesis template
#set($p = 'pik='+ $util.urlEncode($util.base64Decode($input.params('d'))) +
'&user_agent=' + $util.urlEncode($context.identity.userAgent) +'&client_ip=' +
$util.urlEncode($input.params().header.get('X-Forwarded-For')))
{
"Data" : "$util.base64Encode($p)",
"PartitionKey": "$context.requestId",
"StreamName": "TrackerStream"
}
@sadhasivam
sadhasivam / kinesis_timestamp.py
Created December 20, 2016 15:53
kinesis_timestamp.py
datetime.fromtimestamp(float(record["kinesis"]["approximateArrivalTimestamp"]))
@sadhasivam
sadhasivam / Ignore .DS_Store forever
Created July 8, 2017 14:12 — forked from linuslundahl/Ignore .DS_Store forever
Make git always ignore .DS_Store
$ git config --global core.excludesfile ~/.gitignore
$ echo .DS_Store >> ~/.gitignore
@sadhasivam
sadhasivam / large_sql_data.sql
Created October 2, 2017 17:56
large_sql_data.sql
-- PageView Retailer By Tender Type
SELECT page_view.retailer_code AS "Partner",
CASE
WHEN page_view.payment_type = 'visa'
OR page_view.payment_type LIKE '%visa%'
OR page_view.payment_type = 'Visa'
OR page_view.payment_type = 'vi' THEN 'Visa'
WHEN page_view.payment_type = 'mastercard'
OR page_view.payment_type LIKE '%master%'
OR page_view.payment_type = 'mc' THEN 'MasterCard'