Skip to content

Instantly share code, notes, and snippets.

@Krisztiaan
Krisztiaan / npu.user.js
Created May 24, 2022
Neptun PowerUp! de ki lehet szűrni az opcionális tárgyakat.
View npu.user.js
// ==UserScript==
// @name Neptun PowerUp!
// @namespace http://example.org
// @description Felturbózza a Neptun-odat
// @version 2.3.0
// @downloadURL https://github.com/solymosi/npu/releases/latest/download/npu.user.js
// @include https://*neptun*/*hallgato*/*
// @include https://*neptun*/*Hallgatoi*/*
// @include https://*neptun*/*oktato*/*
// @include https://*hallgato*.*neptun*/*
View 040811_30.txt
This file has been truncated, but you can view the full file.
$GPRMC,093858.5,V,4729.20233,N,01904.79403,E,,,080422,004.1,E,N*13
$GPGGA,093858.5,4729.20233,N,01904.79403,E,0,00,,,M,,M,,*44
$GPVTG,,T,,M,,N,,K,N*2C
$GPRMC,093858.6,V,4729.20233,N,01904.79403,E,,,080422,004.1,E,N*10
$GPGGA,093858.6,4729.20233,N,01904.79403,E,0,00,,,M,,M,,*47
$GPVTG,,T,,M,,N,,K,N*2C
$GPRMC,093858.7,V,4729.20233,N,01904.79403,E,,,080422,004.1,E,N*11
$GPGGA,093858.7,4729.20233,N,01904.79403,E,0,00,,,M,,M,,*46
$GPVTG,,T,,M,,N,,K,N*2C
@Krisztiaan
Krisztiaan / clean_workflows.sh
Created Feb 13, 2022
Delete all workflow runs from disabled actions, so GitHub will not show them in actions anymore.
View clean_workflows.sh
#!/bin/bash
if ! command -v gh &>/dev/null; then
echo "The GitHub CLI <gh> could not be found."
read -p "Do you want to install it? " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Installing GitHub CLI..."
if ! command -v brew &>/dev/null; then
echo "The <brew> command could not be found."
View getNativeComponent.ts
import React, { useRef, useImperativeHandle } from 'react';
import type { HostComponent } from 'react-native';
import {
NativeModules,
findNodeHandle,
Platform,
UIManager,
requireNativeComponent,
} from 'react-native';
View toSerializable.ts
type AnyValue =
| { [key: string]: AnyValue }
| { [key: number]: AnyValue }
| AnyValue[]
| string
| number
| boolean
| null
| undefined
| symbol
@Krisztiaan
Krisztiaan / package.json
Last active Apr 1, 2021
Simple hook to use Fuse.js
View package.json
{
"name": "use-fuse",
"version": "1.0.1",
"main": "useFuse.ts"
}
@Krisztiaan
Krisztiaan / package.json
Created Mar 12, 2021
Simple debounce hook
View package.json
{
"name": "use-debounce",
"version": "1.0.0",
"main": "useDebounce.ts"
}
View useDebouncedState.ts
import { useState, useEffect } from 'react'
export default function useDebouncedState<T>(value: T, delay: number) {
const [debouncedValue, setDebouncedValue] = useState<T>(value)
useEffect(() => {
const handler = setTimeout(() => setDebouncedValue(value), delay)
return () => clearTimeout(handler)
}, [value, delay, setDebouncedValue])
@Krisztiaan
Krisztiaan / index.d.ts
Created Sep 9, 2020
react-native-tvos@0.62.2-1 typescript typing extension
View index.d.ts
import '@types/react-native';
import React from 'react';
import { ViewProps } from 'react-native';
declare module 'react-native' {
export const TVMenuControl: {
enableTVMenuKey(): void;
disableTVMenuKey(): void;
};
View useComponentSize.ts
import { useState, useCallback } from 'react'
import { LayoutChangeEvent } from 'react-native'
interface Measurement {
width: number
height: number
}
type OnLayoutCallback = (event: LayoutChangeEvent) => void