Skip to content

Instantly share code, notes, and snippets.

rules_version = '2';
service firebase.storage {
match /b/projectname.appspot.com/o {
match /{allPaths=**} {
// Allow access by all users
allow read, write;
}
}}
// This is a basic uniswap frontrunning MEV bot
// Made by Merunas follow me on youtube to see how to use it and edit it: https://www.youtube.com/channel/UCJInIwgW1duAEnMHHxDK7XQ
// 1. Setup ethers, required variables, contracts and start function
const { Wallet, ethers } = require('ethers')
const { FlashbotsBundleProvider, FlashbotsBundleResolution } = require('@flashbots/ethers-provider-bundle')
// 1.1 Setup ABIs and Bytecodes
const UniswapAbi = [{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"amountADesired","type":"uint256"},{"internalType":"uint256","name":"amountBDesire
@manniru
manniru / RFID-Pi.md
Created September 17, 2019 12:06 — forked from andrewvaughan/RFID-Pi.md
Reading RFID via UART on the RaspberryPi

RFID via UART on RaspberryPi

Download the Latest Version of Raspbian Lite

This can be downloaded here. It is highly recommended to download the Lite version. You can also download the full version, but most of the image is just bloat for this project.

Prepare the MicroSD Card

It is recommended to get a Class 10 or better card to improve speeds. Lower-quality cards will take tremendously longer to format, configure, and load on the RaspberryPi.

import React from "react";
// import "./style.css";
const Students = props => {
/*
db.collection("cities")
.get()
.then(function(querySnapshot) {
querySnapshot.forEach(function(doc) {
// doc.data() is never undefined for query doc snapshots
console.log(doc.id, " => ", doc.data());
Standard PDF Fonts
David Gasperoni edited this page on 28 Sep 2017 · 3 revisions
'Courier'
'Courier-Bold'
'Courier-Oblique'
'Courier-BoldOblique'
'Helvetica'
'Helvetica-Bold'
'Helvetica-Oblique'
'Helvetica-BoldOblique'
@manniru
manniru / gist:d2297a946925b0d91de1810f9ec9ca51
Created September 26, 2019 12:31 — forked from troelskn/gist:1287893
Luhn's algorithm in php
<?php
function is_valid_luhn($number) {
settype($number, 'string');
$sumTable = array(
array(0,1,2,3,4,5,6,7,8,9),
array(0,2,4,6,8,1,3,5,7,9));
$sum = 0;
$flip = 0;
for ($i = strlen($number) - 1; $i >= 0; $i--) {
$sum += $sumTable[$flip++ & 0x1][$number[$i]];
<?php
$my_text = 'The quick brown [fox].';
preg_match('#\[(.*?)\]#', $my_text, $match);
print $match[1]."\n";
?>
@qpre
qpre / elixir.yml
Created January 28, 2020 15:07
GitHub Actions for Elixir/Phoenix test/build/release + release on GitHub
name: Elixir CI
on: push
jobs:
test:
runs-on: ${{ matrix.os }}
name: OTP ${{ matrix.otp }} | Elixir ${{ matrix.elixir }} | Node ${{ matrix.node }} | OS ${{ matrix.os }}
strategy:
matrix:
require_once DRUPAL_ROOT .'/vendor/dompdf/dompdf/src/Autoloader.php';
Autoloader::register();
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\JsonResponse;
use Drupal\Core\Controller\ControllerBase;
use Dompdf\Autoloader;
use Dompdf\Dompdf;
...
<style>
@page { margin-top: -60px }
table {
width: 100%;
}
p {
font-family: "Arial";
font-weight: bold;
}
/*@page { margin: 1.7cm 2cm }*/