This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| OpenSimplexNoise noise; | |
| int[][] result; | |
| float t, c; | |
| float ease(float p) { | |
| return 3*p*p - 2*p*p*p; | |
| } | |
| float ease(float p, float g) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const puppetteer = require("puppeteer"); | |
| /** | |
| * @param {string} pageUrl The URL that you want to gather coverage data for | |
| */ | |
| const unusedCode = async pageUrl => { | |
| const browser = await puppetteer.launch(); | |
| console.log("browser launched"); | |
| const page = await browser.newPage(); | |
| console.log("new page created"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const _ = require('lodash'); | |
| module.exports = function({ ratios, options, variants }) { | |
| return function({ addUtilities, e }) { | |
| const opts = Object.assign({}, { | |
| orientedRatios: false, | |
| invertedRatios: false | |
| }, options); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| self.addEventListener('install', (e) => { | |
| e.waitUntil( | |
| caches.open("precache").then((cache) => cache.add("/broken.png")) | |
| ); | |
| }); | |
| function isImage(fetchRequest) { | |
| return fetchRequest.method === "GET" && fetchRequest.destination === "image"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Update this by running | |
| # curl https://gist.githubusercontent.com/mpdude/804005e2bc7717bc36e4def876a5303d/raw/fix-php-cs.yml > .github/workflows/fix-cs-php.yml | |
| name: Coding Standards | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use argon2::{Argon2, PasswordHash}; | |
| use axum_extra::extract::cookie::{Cookie, SameSite}; | |
| use axum_extra::extract::CookieJar; | |
| async fn login_user( | |
| ctx: State<ApiContext>, | |
| Json(data): Json<LoginUser>, | |
| ) -> Result<(CookieJar, Json<LoginResponse>)> { | |
| let user = models::user::get_user_pass_hash(&ctx.db, &data.email) | |
| .await? |
OlderNewer