Skip to content

Instantly share code, notes, and snippets.

View caracal7's full-sized avatar

Dmitrii Vasilev caracal7

  • This planet
View GitHub Profile
@irazasyed
irazasyed / outbound-email-with-cloudflare.md
Last active November 15, 2024 22:45
Using Gmail SMTP with Cloudflare Email Routing: A Step-by-Step Guide

Using Gmail SMTP with Cloudflare Email Routing: Step-by-Step Guide

Learn how to send emails through Gmail SMTP with Cloudflare Email Routing in this comprehensive guide.

Step 1: Enable 2-Factor Authentication

To proceed with this method, ensure that you have enabled two-factor authentication for your Google account. If you haven't done so already, you can follow the link to set it up → Enable 2FA in your Google account.

Step 2: Create an App Password for Mail

@ilyar
ilyar / The_most_effective_attacks_against_web_applications.md
Last active April 30, 2023 13:23
Самые эффективные атаки на веб-приложения origin https://hackmd.io/7QGe2cu4QLeNU1Z87GQFMw?view

Самые эффективные атаки на веб-приложения

Ожидания от workshop'a

Общаемся 2 часа с перерывом на 15 минут
Моя задача рассказать об интересных атаках и объяснить как научиться их проводить
Первый час будет рассказ об атаках на веб приложения
Второй час будет демонстрацией практического применения атак
@Laslo89
Laslo89 / js_object_to_dot_notation
Last active February 24, 2020 19:36
some helpful helper functions regarding object manipulation, arrays and so on
// convert plain object to dot notation
// For example the following object:
/*
const obj = {
app: {
lang: {
menu: {
welcome: "welcome",
label: "label"
},
@codesections
codesections / actix-web.rs
Created December 20, 2018 22:03
Basic static file server with actix-web
extern crate actix_web;
use actix_web::{fs, server, App};
fn main() {
server::new(|| {
App::new()
.handler(
"/",
fs::StaticFiles::new("./public")
.unwrap()
@codesections
codesections / server.rs
Last active March 20, 2022 04:35
Naive static file server in rust
use std::io::prelude::*;
use std::net::TcpListener;
use std::net::TcpStream;
mod app;
fn main() {
let listener = TcpListener::bind("127.0.0.1:7878").unwrap();
for stream in listener.incoming() {
let stream = stream.unwrap();
handle_connection(stream);
@sketchpunk
sketchpunk / QuaterionSpring.js
Created November 17, 2018 06:07
Spring Physics - Oscillation and Critical Dampening on Quaternions
// Resources
// https://burakkanber.com/blog/physics-in-javascript-car-suspension-part-1-spring-mass-damper/
// https://gafferongames.com/post/spring_physics/
// https://gafferongames.com/post/physics_in_3d/
// http://digitalopus.ca/site/pd-controllers/
// .. Has things about Torque
class QuaterionSpring{
constructor( damping=5, stiffness=30 ){
this.velocity = new Float32Array(4);
@Andrew-Reid
Andrew-Reid / index.html
Last active October 9, 2022 11:10
Nested Enter/Update/Exit with id
<html>
<head>
<script src="https://d3js.org/d3.v4.js"></script>
</head>
<body>
<script>
// starter data:
var data = [
{id:0, children: d3.range(10)},
@antonagestam
antonagestam / draw_loop.js
Last active December 8, 2018 01:07
Asynchronous animation loop
/*
A slightly more condensed version of https://esdiscuss.org/topic/promises-async-functions-and-requestanimationframe-together
*/
let animation_frame = () => new Promise(window.requestAnimationFrame);
(async () => {
while (true) {
await animation_frame();
// draw
}
@axjs
axjs / xor.js
Created February 19, 2018 09:50
XOR crypt
const encrypt = (str, key) => str
.split('')
.map(s=>(s.charCodeAt()^key).toString(16))
.join('g')
;
const decrypt = (str, key) => str
.split('g')
.filter(Boolean)
.map(s=> String.fromCharCode(parseInt(s,16)^key) )
.join('')
// var diffSwap = require('myers-diff-array-swap')
var remove = require('remove-array-items')
var diff = require('myers-diff-array')
var assert = require('assert')
var morphNode = require('./lib/morph')
function Morph () {
this.results = []
this.swaps = []