Skip to content

Instantly share code, notes, and snippets.

View ar1a's full-sized avatar

aria ar1a

View GitHub Profile
@ievans
ievans / index.js
Created June 6, 2019 17:49
electron-native-notify-1.1.6 malicious source code
const MainProcessNotification = require("electron").Notification;
const isRenderer = process && process.type === "renderer";
const isSupported = () => isRenderer ? "Notification" in window : MainProcessNotification.isSupported();
const renderNotify = (title, body) => {
const notification = new Notification(title, {
body: body
});
return notification
};
try {
@Brettm12345
Brettm12345 / validate.ts
Created September 20, 2019 08:08
Yup validate function with fp-ts
import { toError } from 'fp-ts/lib/Either';
import { tryCatch } from 'fp-ts/lib/TaskEither';
import { Schema } from 'yup';
const validate = <T extends Schema<any>>(constructor: T) => (input: any) =>
tryCatch<Error, T extends Schema<infer P> ? P : never>(
() => constructor.validate(input),
toError
);
@Brettm12345
Brettm12345 / nixos-option.sh
Last active February 4, 2021 13:30
nixos-option with fzf
#! /usr/bin/env nix-shell
#! nix-shell -i sh -p jq fzf
OPTION_CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/nixos-options.json"
test -f "$OPTION_CACHE" || {
echo "Building cache..."
cp "$(export NIXPKGS_ALLOW_UNFREE=1; nix-build -Q --no-out-link '<nixpkgs/nixos/release.nix>' -A options)/share/doc/nixos/options.json" "$OPTION_CACHE"
}
OPTION=$(jq -r 'keys | join("\n")' "$OPTION_CACHE" | fzf --height "60%" --preview 'nixos-option {}')
@Dinoxe
Dinoxe / Rafis-skins-s-superanckie-som.md
Last active June 10, 2024 16:37
Rafis osu skins super duper
@smoogipoo
smoogipoo / offsets.md
Last active September 28, 2023 04:52
Master doc on offsets in osu!

Last updated: 2021-07-27

How offsets and latency work

This is the pictorial representation that I'll use to explain how a player's timings could come about:

            hitobject     track latency    beat (track)
               vvv             vvv             vvv
Track: ---------H---T---------H---T---------H---T---------H---T-------------
User: -------------K---S---------K---S---------K---S---------K---S---------