Skip to content

Instantly share code, notes, and snippets.

View mrcat323's full-sized avatar

Mr CaT mrcat323

View GitHub Profile
@mrcat323
mrcat323 / wormhole-exploit.py
Created January 11, 2018 07:50 — forked from jianingy/wormhole-exploit.py
wormhole-exploit
import requests
import click
import sys
def fail(reason):
click.echo(click.style('[!] %s' % reason, fg='red'), err=True)
sys.exit(111)
@mrcat323
mrcat323 / removeNotUpperCase.js
Last active July 20, 2018 13:40
Remove elements from array which don't begin with uppercase symbol
let removeNotUpperCase = (array) => {
for (var key in array) {
return (array[key][0] == array[key][0].toUpperCase()) ? true : false;
}
}
let array = ['Mr', 'CaT', 'is', 'not', 'best', 'He', 'Is', 'Best', 'Of', 'Course'];
console.log(array.filter(removeNotUpperCase));
@mrcat323
mrcat323 / solving.html
Created July 26, 2018 17:47
Here we did solve the task and used some of our knowledge and tested them
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Solving sum</title>
<style>
.external {
background-color: yellow
@mrcat323
mrcat323 / polyfillsAndEtc.js
Created July 27, 2018 17:18
Here are some interesting functions and polyfills that I did write for JS practice
Element.prototype.empty = function () {
while (this.firstChild) {
this.removeChild(this.firstChild);
}
}
var removeNonUpperCaseElementInArray = function (array) {
for (var key in array) {
return (array[key][0] == array[key][0].toUpperCase()) ? true : false;
}
@mrcat323
mrcat323 / closest-polyfill.js
Created July 27, 2018 17:36
Just solved this sum, interesting to my mind stuff, I know that there is the method like this in JS with the same name, but I wanted to create my own one, and also for IE-s capability
//
Element.prototype.closest = function (selector) {
if (selector[0] == '.') {
var className = selector.slice(1);
if (this.parentNode && this.parentNode.classList.contains(className)) {
return this.parentElement;
} else if (this.previousSibling && this.previousSibling.classList.contains(className)) {
return this.previousElementSibling;
} else if (this.nextSibling && this.nextSibling.classList.contains(className)) {
@mrcat323
mrcat323 / index.html
Created August 3, 2018 16:37
Learning Vue. Dynamic components, with reactice Vue.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Dynamic components</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
@mrcat323
mrcat323 / styles.css
Created August 3, 2018 16:38
The stylesheet for the index.html
* {
box-sizing: border-box;
}
body {
padding: 0;
margin: 0;
font-family: 'Roboto', sans-serif;
}
@mrcat323
mrcat323 / index.html
Created August 6, 2018 11:29
Ordering data with Vue JS v.2+ with LoDash dependencies
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Vue ordering</title>
</head>
<body>
import Vue from 'vue';
import Vuex from 'vuex';
import axios from 'axios';
import notes from '../api';
Vue.use(Vuex);
const notesStore = new Vuex.Store({
state: {
notes: [],
@mrcat323
mrcat323 / key.txt
Created September 15, 2018 13:29
My public PGP key. Send me message [email protected]
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQMuBFrkVc4RCACp9eow0Qo/XMqxMM/aTQjdLzKbliSpUKGFoZLhlDBauV1e1V0K
Y9FAI0XNoGFhitzkhXEUDDrv3boV0DoKy1fGbZ3RwYY6EpPrnehORJFEIRL361PV
eVQpZbgx2yhJF5OiyDa47YPUnFEQNK8i5dBkQ7hf/2EkRJKs2CmC8up8b7odgiuc
J18IK/78s49Tbelqr/hq4gozgKd/3ozxh7dT0FOiHUyLuTopicRCYTWaV88J0WH6
ivH9YQW4BGRgwikmgbaSceWDeG7GxFwMm+w4RwoaNkSq0+2guTwCGcyhAUw2vBwS
PoOe4fHXHQAby7MI02CzvuCzJ+jlIvQofCerAQD5nvBI698Ai/3ZfGFztYjjU09v
Nd//aizjneNHz/CZTQf+NAc+R1M7veMZv1U3kiSi4NlDZB6SPMH2Lc6AgFet0IBO