Skip to content

Instantly share code, notes, and snippets.

View YEK-PLUS's full-sized avatar

Yunus Emre YEK-PLUS

  • İzmir-Prizren-London
View GitHub Profile
@YEK-PLUS
YEK-PLUS / helper.js
Created September 23, 2019 18:51
api using
import { TryLogin } from './user';
const Login = async (username,password) => {
const response = await UserDetails(username,password);
return response;
};
export default { Login };
@YEK-PLUS
YEK-PLUS / React Redux Object Handler.js
Created August 4, 2019 20:15
React Redux Object Handler
import React from 'react';
import PropTypes from 'prop-types';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
//import App from '$/component/app';
import * as UserActions from '$/state/actions/user';
const mapStateToProps = state => ({
@YEK-PLUS
YEK-PLUS / KFIOFan level 1 step-3
Created July 12, 2019 23:31
KFIOFan level 1 steps
root@kali:~# ssh alice@10.0.2.6 -i connect
Linux kfiofan 4.9.0-7-amd64 #1 SMP Debian 4.9.110-1 (2018-07-05) x86_64
.__....._ _.....__,
.": o :': ;': o :".
`. `-' .'. .'. `-' .'
`---' `---'
@YEK-PLUS
YEK-PLUS / KFIOFan level 1 step-2
Created July 12, 2019 23:25
KFIOFan level 1 steps
root@kali:~# ssh alice@10.0.2.6 -i connect
The authenticity of host '10.0.2.6 (10.0.2.6)' can't be established.
ECDSA key fingerprint is SHA256:bQQrKQtpfwR4II3PkZwHQ49Sl4tXB1tOAGVWCxr96Zc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.2.6' (ECDSA) to the list of known hosts.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for 'connect' are too open.
It is required that your private key files are NOT accessible by others.
@YEK-PLUS
YEK-PLUS / KFIOFan level 1 step-1
Last active July 12, 2019 23:24
KFIOFan level 1 steps
root@kali:~# nmap -sV 10.0.2.6
Starting Nmap 7.70 ( https://nmap.org ) at 2019-07-11 20:33 EDT
Nmap scan report for 10.0.2.6
Host is up (0.00013s latency).
Not shown: 998 closed ports
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.4p1 Debian 10+deb9u3 (protocol 2.0)
80/tcp open http Apache httpd
MAC Address: 08:00:27:22:27:72 (Oracle VirtualBox virtual NIC)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
//Source: http://stackoverflow.com/questions/6150289/how-to-convert-image-into-base64-string-using-javascript
$( "#imagetourl" ).click(function() {
function toDataUrl(url, callback) {
var xhr = new XMLHttpRequest();
xhr.onload = function() {
var reader = new FileReader();
reader.onloadend = function() {
callback(reader.result);
}
[
[ 2, 4, 3 ,3 , 30],
[ 2, 4, 5 , 3, 3],
[ 2, 4, 5 ,4, 3],
[ 3, 9, 5 ,4 ,4],
[ 3, 9, 7 ,4 ,4],
[ 3, 9, 8 ,4 ,4],
[ 4, 16, 9 ,4 ,4],
[ 4, 16, 10 ,4 ,4],
[ 4, 16, 11 ,4 ,4],
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
<?php
$stmt = $pdo->prepare('SELECT * FROM users WHERE email = ? AND status=?');
$stmt->execute([$email, $status]);
$user = $stmt->fetch();
// or
$stmt = $pdo->prepare('SELECT * FROM users WHERE email = :email AND status=:status');
$stmt->execute(['email' => $email, 'status' => $status]);
$user = $stmt->fetch();
?>