Skip to content

Instantly share code, notes, and snippets.

View dimitrisdovinos's full-sized avatar

Dimitris dimitrisdovinos

View GitHub Profile
require 'openssl'
require 'base64'
aes = OpenSSL::Cipher.new("AES-256-CBC")
aes.encrypt
aes.key = Base64.decode64("4VZS/oCY73fTENgF8LyLq00B+bsXEHLlAFpRhoDXTKc=")
aes.iv = OpenSSL::Cipher.new("AES-256-CBC").random_iv
cipher = aes.update("I'm scared if I stop all at once, the cumulative hangover will literally kill me.")
cipher << aes.final
id Name Bank Account Number Blood type
1 hRsNNqk5KF6v3TJjoijW8BNGjrX4yGtaIaZD6cvm94Vt45nlaW0O7moiVWQ/pDac 5giriyTJzntm/sp7gSaBN5Wm8NUb+tv2THu6xkRRJgM= TxQhCITXuitXKKkJ9RuKfQe87+wV8j+0SqSarU/kaKk=
2 Rz48IlQ0OeDpdLkdj+W7h5jTRyTs048HMqhpwGoKTsA= mFRg/48E67WksVV8MoY2zbR/fWcLiXRODuV3ALXCo10= TxQhCITXuitXKKkJ9RuKfQe87+wV8j+0SqSarU/kaKk=
id Name Bank Account Number Bloot type
1 Dimitris Dovinos 6666666666 -A
2 Archer Sterling 9999999999 B
{
"StorageDescriptor": {
"cols": {
"FieldSchema": [
{
"name": "id",
"type": "bigint",
"comment": ""
},
{
id,name,host_id,host_name,neighbourhood_group,neighbourhood,latitude,longitude,room_type,price,minimum_nights,number_of_reviews,last_review,reviews_per_month,calculated_host_listings_count,availability_365
10595,"96m2, 3BR, 2BA, Metro, WI-FI etc...",37177,Emmanouil,,ΑΜΠΕΛΟΚΗΠΟΙ,37.98887924384334,23.764314563525055,Entire home/apt,71,1,17,2019-01-12,0.18,8,294
10988,"75m2, 2-br, metro, wi-fi, cable TV",37177,Emmanouil,,ΑΜΠΕΛΟΚΗΠΟΙ,37.988434261427905,23.763446602200577,Entire home/apt,82,1,31,2017-11-23,0.40,8,0
10990,"50m2, Metro, WI-FI, cableTV, more",37177,Emmanouil,,ΑΜΠΕΛΟΚΗΠΟΙ,37.98783415721626,23.76478728692748,Entire home/apt,47,1,27,2019-02-01,0.35,8,282
10993,"Studio, metro, cable tv, wi-fi, etc",37177,Emmanouil,,ΑΜΠΕΛΟΚΗΠΟΙ,37.98860728307634,23.76422238412952,Entire home/apt,37,1,42,2019-02-02,0.54,8,286
...
<TextField
error={errors.email && touched.email}
label="email"
name="email"
className={classes.textField}
value={values.email}
onChange={handleChange}
onBlur={handleBlur}
helperText={(errors.email && touched.email) && errors.email}
margin="normal"
import React, { useState } from 'react';
import { withStyles } from '@material-ui/core/styles';
import TextField from '@material-ui/core/TextField';
import Button from '@material-ui/core/Button';
import Dialog from '@material-ui/core/Dialog';
import DialogActions from '@material-ui/core/DialogActions';
import DialogContent from '@material-ui/core/DialogContent';
import DialogContentText from '@material-ui/core/DialogContentText';
import DialogTitle from '@material-ui/core/DialogTitle';
import axios from 'axios';
insert into sales select nextval('sales_id_seq'), customer_first_name, customer_last_name, item_name, item_qty, total_spent
from t_data;
update t_data set customer_last_name = split_part(customer, ' ', 2);
update t_data set customer_first_name = split_part(customer,' ',1) ;