Skip to content

Instantly share code, notes, and snippets.

View gostrafx's full-sized avatar

GOSTRA FX gostrafx

View GitHub Profile
@shingming
shingming / SaveImage2AndroidGallery.cs
Last active March 29, 2024 11:52
Unity3D: Save Image to Android Gallery (Test on API level 28 - 33)
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SaveImage2AndroidGallery
{
/// <summary>
/// Save the image byte data to the Android gallery.
@Grafikart
Grafikart / jsr.js
Created August 24, 2023 08:38
jetsetradio.live downloader (nodejs)
import {chromium, devices} from 'playwright';
import ora from 'ora';
import inquirer from 'inquirer'
import {createWriteStream} from 'node:fs'
import {mkdir} from 'node:fs/promises'
import {get} from 'node:https'
/**
* Download music from jetsetradio.live
*
@yasirkula
yasirkula / PaddingIgnoringImage.cs
Last active May 29, 2024 17:39
Modified version of Image component that ignores the sprite's padding in Unity
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Sprites;
using UnityEngine.UI;
#if UNITY_2017_4 || UNITY_2018_2_OR_NEWER
using UnityEngine.U2D;
#endif
#if UNITY_EDITOR
using UnityEditor;
@druggedhippo
druggedhippo / NavMeshGenA.cs
Last active June 9, 2024 23:49
Unity Navigation mesh by terrain texture
/****
NOTE NOTE NOTE
1. Add this component to a terrain
2. Set your area ID's to be what you want the agent to think each surface in your terrain is (eg, Grass, Path), in the same order as the textures assigned in the terrain textures
3. Set "Defaultarea" to be whatever texture you expect to be the "most" common terrain texture. Generall this will be the first texture you assigned in step 1, eg "Grass"
IF THIS IS STILL TO SLOW:
# To run this script make a directory called elasticsearch for your data.
# Note that this script won't work if your data is too big for local disk.
import pickle
from elasticsearch import Elasticsearch
### CHANGE THESE CONSTANTS TO MATCH THE ELASTICSEARCH CLUSTER YOU'RE MIGRATING FROM ###
ES_HOST = "example.elasticsearch.url.com"
ES_PORT = 9200
ES_INDEX = "my_index_name"
@TameemS
TameemS / debloatMEmu.md
Last active July 11, 2024 15:18
Debloating & Optimizing MEmu

Inspired by this

More of my guides: Debloating LDPlayer - Debloating Nox (Updated)

Edit 22/8/2021: I have updated MEmu and it seems like it reinstalls the apps and re-enables the services. Repeat steps 5, 7, 8, and 9 if you update MEmu.

Debloating MEmu

In my experience, Nox can be quite slow and choppy, and looks like I'm not the only person with this problem. A lot of people say that MEmu performs better than Nox, and I could agree with that. I have no chopping issues with it so far. But like Nox, there are kinda shady stuff going on.

using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
@opexxx
opexxx / WMIPersistence.vbs
Created September 22, 2020 11:17 — forked from mgeeky/WMIPersistence.vbs
Visual Basic Script implementing WMI Persistence method (as implemented in SEADADDY malware and further documented by Matt Graeber) to make the Macro code schedule malware startup after roughly 3 minutes since system gets up.
'
' SYNOPSIS:
' WMI Persistence method as originally presented by SEADADDY malware
' (https://github.com/pan-unit42/iocs/blob/master/seaduke/decompiled.py#L887)
' and further documented by Matt Graeber.
'
' The scheduled command will be launched after roughly 3 minutes since system
' gets up. Also, even if the command shall spawn a window - it will not be visible,
' since the command will get invoked by WmiPrvSE.exe that's running in Session 0.
'
@alpteo
alpteo / semantic-commit-messages-with-emojis.md
Last active June 24, 2024 18:37
Semantic Commit Messages with Emojis

Semantic Commit Messages with Emojis

Commit format: <emoji_type> <commit_type>(<scope>): <subject>. <issue_reference>

Example

:sparkles: feat(Component): Add a new feature. Closes: #
^--------^ ^--^ ^-------^   ^---------------^  ^------^
|          |    |           |                  |
| | | | +--&gt; (Optional) Issue reference: if the commit closes or fixes an issue
@hata-hack
hata-hack / chlog.py
Created February 23, 2020 08:00
Checking logs for sites
#! /usr/bin/python
# -*- coding: utf-8 -*-
import os
import codecs
def hhelo():
print('+___________________________________________________________+')
print('| CheLog v0.1 |')
print('| |')
print('| Checking the logs for the presence of the sites you need |')