Skip to content

Instantly share code, notes, and snippets.

View itspacchu's full-sized avatar

Prashant itspacchu

View GitHub Profile
{
"AQ-AD95-00":{
"EMOJI":"res://images/cloud.svg",
"NODE_NAME":"AQ-AD95-00",
"NODE_VERTICAL":"AE-AQ",
"POSITION":{
"X":-7.29647,
"Y":-1.00922,
"Z":22.723301
},
import requests
import base64
import json
PASSWORD = ""
ADD,RM = "add","rm"
API_URL = "https://wisun.api.prashantnook.in/update"
def send_update(nodeA,nodeB,contype=ADD):
headers = {
alias yay paru
yay -S flutter
java -version
sudo pacman -S jre8-openjdk
export JAVA_HOME='/usr/lib/jvm/java-8-openjdk'
export PATH=$JAVA_HOME/bin:$PATH
@itspacchu
itspacchu / handle_smear.gd
Created September 4, 2022 15:27
Smear effect in godot
extends MeshInstance
var mat;
var prev_position;
var zpos = 10;
func _ready() -> void:
mat = self.get_active_material(0)
prev_position = translation
print(mat)
@itspacchu
itspacchu / alacritty.yml
Created April 4, 2022 15:43
Alacritty config
env:
# TERM variable
TERM: xterm-256color
window:
# Window dimensions (changes require restart)
dimensions:
columns: 96
lines: 24
@itspacchu
itspacchu / custom_pihole_hosts.txt
Created November 6, 2021 18:30
my custom pihole blocks
http://securepubads.g.doubleclick.net
http://www.googletagservices.com
http://gads.pubmatic.com
http://ads.pubmatic.com
http://spclient.wg.spotify.com
media-match.com
adclick.g.doublecklick.net
www.googleadservices.com
pagead2.googlesyndication.com
desktop.spotify.com
@itspacchu
itspacchu / interpolated_walk.cs
Created October 24, 2021 06:54
Walking animation between two positions
IEnumerator Walk(Vector3 target, Transform tgt)
{
float t = 0;
Vector3 start = tgt.position;
while(t < 1)
{
LegMoving = true;
t += Time.deltaTime*LegMoveSpeed;
tgt.position = Vector3.Lerp(start, target, t) + Vector3.up * 1.3f*Mathf.Sin(t * Mathf.PI);
@itspacchu
itspacchu / monsieurAdd.py
Created August 8, 2021 15:28
Monsieur Add function optimised to core asf
This file has been truncated, but you can view the full file.
def add(a:int,b:int):
if(a == 0 and b == 0):
return 0
elif(a == 0 and b == 1):
return 1
elif(a == 0 and b == 2):
return 2
elif(a == 0 and b == 3):
return 3
elif(a == 0 and b == 4):
@itspacchu
itspacchu / classthing.py
Created August 7, 2021 06:57
fetch classes
import discord
from discord.ext import commands
from datetime import datetime, time, timedelta
import asyncio
from livclaz import create_calender_event_and_return_values
from discord.ext.commands.core import command
intents = discord.Intents.default()
intents.members = True
@itspacchu
itspacchu / image_distort.py
Created June 6, 2021 19:03
Distort image based on function
def distortImage(theImage,fxn):
theImage = np.asarray(theImage)
bc,gc,rc = theImage[:,:,0] , theImage[:,:,1] ,theImage[:,:,2]
dc = []
for imgChannel in bc,gc,rc:
dImg = np.zeros(imgChannel.shape)
Image.fromarray(dImg)
for i in range(theImage.shape[0]):
for j in range(theImage.shape[1]):
try: