Skip to content

Instantly share code, notes, and snippets.

View mrcat323's full-sized avatar

Mr CaT mrcat323

View GitHub Profile
@mrcat323
mrcat323 / react-es6-flow-emacs-configuration.md
Created October 2, 2021 11:06 — forked from CodyReichert/react-es6-flow-emacs-configuration.md
Configuring Emacs for react, es6, and flow

Configuring Emacs for react, es6, and flow

For a while, JSX and new es6 syntax had flaky support in emacs, but there's been huge work on a lot of packages. Using emacs for JavaScript with React, ES6, and Flow (or Typescript, etc) is really easy and powerful in Emacs these days.

This is how you can work on modern web development projects with full support for tooling like JSX, Flow types, live eslint errors, automatic prettier.js formatting, and more.

Set up web-mode

web-mode provides most of the underlying functionality, so a huge shout-out to the maintainer(s) there.

@mrcat323
mrcat323 / vuetifyjs-login.html
Last active October 2, 2020 10:55 — forked from devinhyden/vuetifyjs-login.html
Vuetifyjs Login Form
<!DOCTYPE html>
<html>
<head>
<link href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons' rel="stylesheet">
<link href="https://unpkg.com/vuetify/dist/vuetify.min.css" rel="stylesheet">
</head>
<style>
#app {
@mrcat323
mrcat323 / composer_versions_cheatsheet.md
Created June 14, 2020 17:26 — forked from calebporzio/composer_versions_cheatsheet.md
Composer version symbol cheatsheet
...
"require": {
    "vendor/package": "1.3.2", // exactly 1.3.2 (exact)

    // >, <, >=, <= | specify upper / lower bounds
    "vendor/package": ">=1.3.2", // anything above or equal to 1.3.2
    "vendor/package": "<1.3.2", // anything below 1.3.2

 // * | wildcard
@mrcat323
mrcat323 / projectile-bookmark.el
Created January 25, 2020 11:10 — forked from gilbertw1/projectile-bookmark.el
the fork of counsel projectile bookmarks
(defun counsel-projectile-bookmark ()
"Forward to `bookmark-jump' or `bookmark-set' if bookmark doesn't exist."
(interactive)
(require 'bookmark)
(let ((projectile-bookmarks (projectile-bookmarks)))
(ivy-read "Create or jump to bookmark: "
projectile-bookmarks
:action (lambda (x)
(cond ((and counsel-bookmark-avoid-dired
(member x projectile-bookmarks)
@mrcat323
mrcat323 / tokens.md
Created July 26, 2019 17:23 — forked from zmts/tokens.md
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Основы:

Аутентификация(authentication, от греч. αὐθεντικός [authentikos] – реальный, подлинный; от αὐθέντης [authentes] – автор) - это процесс проверки учётных данных пользователя (логин/пароль). Проверка подлинности пользователя путём сравнения введённого им логина/пароля с данными сохранёнными в базе данных.

Авторизация(authorization — разрешение, уполномочивание) - это проверка прав пользователя на доступ к определенным ресурсам.

Например после аутентификации юзер sasha получает право обращатся и получать от ресурса "super.com/vip" некие данные. Во время обращения юзера sasha к ресурсу vip система авторизации проверит имеет ли право юзер обращатся к этому ресурсу (проще говоря переходить по неким разрешенным ссылкам)

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 / 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 / pwn.py
Created January 11, 2018 07:48
Quadratically exploit
#!/usr/bin/env python3
import socket, sys, re
from time import sleep
s = socket.socket()
s.connect((sys.argv[1], 6666)) # connect to service, ip in first script arg
# Recv until string occurs
def recv_until(s, st):
buf = ''
while True:
@mrcat323
mrcat323 / self_exploit.py
Created January 11, 2018 07:47 — forked from WGH-/self_exploit.py
Self-exploiting exploit
#!/usr/bin/python2
import sys
from pwn import *
def find_libc_path_and_offset():
with open("/proc/self/maps") as f:
for line in f:
line = line.strip()
@mrcat323
mrcat323 / store.py
Created December 20, 2017 09:09 — forked from jbub/store.py
from kombu import Connection, Exchange, Queue
from kombu.pools import connections
class AmqpStore(Store):
name = 'amqp'
def configure(self, cfg, logger):
url = cfg.var('ITEM_STORE_URL')
self.logger = logger