Skip to content

Instantly share code, notes, and snippets.

View klaszlo8207's full-sized avatar

KL klaszlo8207

  • Planet Earth
View GitHub Profile
@klaszlo8207
klaszlo8207 / scaling_gesture_detector.dart
Last active August 16, 2022 00:44
Flutter ScalingGestureDetector for a 3D view (you can pan and zoom in/out)
import 'package:advert_app/utils/logging.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter/gestures.dart';
class ScalingGestureDetector extends StatefulWidget {
final Widget child;
final void Function(Offset initialPoint) onPanStart;
final void Function(Offset initialPoint, Offset delta) onPanUpdate;
final void Function() onPanEnd;
@klaszlo8207
klaszlo8207 / simple_animated_widget.dart
Created January 6, 2020 15:43
SimpleAnimatedWidget
import 'package:animator/animator.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
class SimpleAnimatedWidget extends StatelessWidget {
SimpleAnimatedWidget({
@required this.child,
@required this.tween,
@required this.builder,
this.curve = Curves.linear,
@klaszlo8207
klaszlo8207 / linkedin_auto_connect_script.js
Created January 6, 2020 16:06
Linkedin auto connect js script Firefox
/*
Navigate to:
https://www.linkedin.com/mynetwork/
then on Firefox press F12 and copy/paste this code + enter
*/
setInterval(() => {
var elems = document.querySelectorAll('[data-control-name="invite"]');
@klaszlo8207
klaszlo8207 / flutter_activate_webdev.txt
Created January 6, 2020 16:11
Flutter activate webdev
flutter packages pub global activate webdev
flutter packages pub global activate stagehand
flutter packages pub get
flutter packages pub global run webdev serve
@klaszlo8207
klaszlo8207 / tinder_auto_like.js
Created January 6, 2020 16:16
Tinder auto like script js
//FF, F12, copy/paste run
setInterval( function () { var o = document.getElementsByClassName("button Lts($ls-s) Z(0) CenterAlign Mx(a) Cur(p) Tt(u) Bdrs(50%) P(0) Fw($semibold) focus-button-style recsGamepad__button D(b) Bgc(#fff) Wc($transform) End(15px) Scale(1.1):h"); o[0].click() }, 300)
using System.Collections;
using UnityEngine;
using UnityEngine.Events;
namespace _MyScripts.Utils
{
public static class CoroutineExtensions
{
public static IEnumerator PostCoroutine(this MonoBehaviour mono, IEnumerator coroutine)
{
using System;
using UnityEngine;
namespace _MyScripts.Utils
{
public static class MeshExtensions
{
public static Mesh PivotToCenter(this Mesh originalMesh)
{
var mesh = new Mesh();
using UnityEngine;
namespace _MyScripts.Utils
{
public static class PlaneUtils
{
private static Camera _camera;
public static void PlaneRotateToCamera(GameObject go, float x, float y, float z)
{
using UnityEngine.SceneManagement;
namespace _MyScripts.Utils
{
public static class SceneUtils
{
private static string NameFromIndex(int buildIndex)
{
var path = SceneUtility.GetScenePathByBuildIndex(buildIndex);
var slash = path.LastIndexOf('/');
@klaszlo8207
klaszlo8207 / Unity_RaycastDemo.cs
Last active January 23, 2023 08:48
Unity raycast demo, egy ismerősnek példaprogi
using UnityEngine;
namespace _MyScripts.Demos
{
public class Unity_RaycastDemo : MonoBehaviour
{
[SerializeField] private Vector3 from = Vector3.zero; //honnan, meliyk pontbol
[SerializeField] private Vector3 direction = Vector3.right; //mi az irany vektor?
[SerializeField, Range(1, 20)] private float distance = 10; //mi a szakasz távolsága
[SerializeField] private LayerMask layerMask = 0; //mi a layerMask, amin van, alapbol Default