Skip to content

Instantly share code, notes, and snippets.

View afarber's full-sized avatar
🏠
Working from home

Alexander Farber afarber

🏠
Working from home
View GitHub Profile
@jamiephan
jamiephan / README.md
Last active November 14, 2024 23:02
A script to automatically add ALL items to your account in quixel

Script to add all items from quixel

As quixel is being removed, all items are free to aquire. This script is to automate the process to add items to your account (As of writing, a total of 18874 items)

Note: This script only tested in the latest version of Chrome.

How to use

  1. Copy the script from below (run.js)
  2. Login into https://quixel.com
@bramreth
bramreth / projectile.gd
Created July 21, 2024 20:50
Source code for my RayCast3D Godot 4.2.2 Projectiles tutorial
extends RayCast3D
@export var speed := 50.0
@onready var remote_transform = RemoteTransform3D.new()
func _physics_process(delta: float) -> void:
position += global_basis * Vector3.FORWARD * delta * speed
target_position = Vector3.FORWARD * delta * speed
force_raycast_update()
@MohammadHosseinGhorbani
MohammadHosseinGhorbani / godot-telegram-game-article.md
Last active October 11, 2024 05:09
Making a Telegram game with Godot

Telegram Games

Telegram is a powerful messenger app with many features; such as games! You can use a Telegram bot and an HTML5 page to share your game in Telegram. The main part of this thing is the HTML5 web page that is your game, Telegram is used to share your game and record the players' score. We will use Godot for the HTML5 part, and Python for the Telegram bot.

Telegram bots can be created using any programming language, therefore Python is not a requirement.

You can read more about Telegram games here.

Let's get started!

The Telegram Bot

@ledangtuanbk
ledangtuanbk / haproxy-redirect-base-on-payload
Last active February 21, 2022 17:39
Haproxy redirect request base on body
Based on this guide
https://stackoverflow.com/questions/23259843/how-to-route-traffic-reverse-proxy-with-haproxy-based-on-request-body
frontend http-in
bind *:80
option http-buffer-request
acl redirect_pingpong req.body -m reg [insert your regular expression here]
use_backend pingpong_backend if redirect_pingpong
default_backend web_bk
@ZsoltMedgyesi-Itineris
ZsoltMedgyesi-Itineris / wayid.lua
Created November 21, 2018 08:30
OSRM profile which gives wayIDs back as road names.
-- Car profile
api_version = 4
Set = require('lib/set')
Sequence = require('lib/sequence')
Handlers = require("lib/way_handlers")
Relations = require("lib/relations")
find_access_tag = require("lib/access").find_access_tag
limit = require("lib/maxspeed").limit
@dlew
dlew / script.sh
Created November 9, 2018 16:36
Simple AndroidX Migration Script
#!/usr/bin/env bash
# I've found that the "Migrate to AndroidX" converter in Android Studio doesn't work very
# well, so I wrote my own script to do the simple job of converting package names.
#
# You can download a CSV of package names here: https://developer.android.com/topic/libraries/support-library/downloads/androidx-class-mapping.csv
#
# It'll run faster on a clean build because then there are fewer files to scan over.
#
# Uses `gsed` because I'm on a Mac. Can easily replace with `sed` if you don't have `gsed`.
@florina-muntenescu
florina-muntenescu / Data.kt
Last active October 16, 2024 21:39
Using RoomDatabase#Callback to pre-populate the database - https://medium.com/google-developers/7-pro-tips-for-room-fbadea4bfbd1
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@nanasess
nanasess / Jwks.cs
Created August 8, 2017 01:04
RSA public key to JWKs(JSON Web Key Set) for C#
using System;
using System.Collections.Generic;
using System.IO;
using System.Security.Cryptography;
using Microsoft.IdentityModel.Tokens;
using Newtonsoft.Json;
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.OpenSsl;
namespace TestCommands
@sagivo
sagivo / gist:3a4b2f2c7ac6e1b5267c2f1f59ac6c6b
Last active November 1, 2024 11:38
webRTC stun / turn server list
to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice
stun:
stun.l.google.com:19302,
stun1.l.google.com:19302,
stun2.l.google.com:19302,
stun3.l.google.com:19302,
stun4.l.google.com:19302,
stun.ekiga.net,
stun.ideasip.com,
@Suleiman19
Suleiman19 / Header.java
Last active June 27, 2019 14:31
Sample code snippets for using mikepenz/FastAdapter library and its various features
public class Header extends AbstractItem<Header, Header.ViewHolder> {
String title;
public Header(String title) {
this.title = title;
}
public String getTitle() {
return title;