Skip to content

Instantly share code, notes, and snippets.

View motz61's full-sized avatar
๐Ÿคง
Out sick

Moลฃ motz61

๐Ÿคง
Out sick
View GitHub Profile
@motz61
motz61 / ConvertTexturesToPNG.cs
Created February 21, 2022 09:39 — forked from yasirkula/ConvertTexturesToPNG.cs
Convert all TGA, TIFF, PSD and BMP (customizable) Textures to PNG to reduce the project size without any quality loss in Unity
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using UnityEditor;
using UnityEngine;
using Debug = UnityEngine.Debug;
using Object = UnityEngine.Object;
@motz61
motz61 / DuplicateAssetDetector.cs
Created February 20, 2022 22:12 — forked from yasirkula/DuplicateAssetDetector.cs
Find duplicate assets in Unity
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Security.Cryptography;
using UnityEditor;
using UnityEditor.IMGUI.Controls;
using UnityEngine;
using Object = UnityEngine.Object;
@motz61
motz61 / .gitattributes
Created January 27, 2022 16:50 — forked from Srfigie/.gitattributes
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@motz61
motz61 / FileVersion.cpp
Created October 22, 2021 16:40 — forked from wyyqyl/FileVersion.cpp
Get file version with WIN32 API
// FileVersion.h: interface for the CFileVersion class.
// by Manuel Laflamme
//////////////////////////////////////////////////////////////////////
#ifndef __FILEVERSION_H_
#define __FILEVERSION_H_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
class CFileVersion {
// Construction
@motz61
motz61 / pfctl-cheatsheet.txt
Created September 26, 2021 02:43 — forked from johnbianchi/pfctl-cheatsheet.txt
pfctl cheat sheet
#### General PFCTL Commands ####
$ pfctl -d disable # packet-filtering
$ pfctl -e enable # packet-filtering
$ pfctl -q # run quiet
$ pfctl -v -v # run even more verbose
#### Loading PF Rules ####
$ pfctl -f /etc/pf.conf # load /etc/pf.conf
$ pfctl -n -f /etc/pf.conf # parse /etc/pf.conf, but dont load it
$ pfctl -R -f /etc/pf.conf # load only the FILTER rules
$ pfctl -N -f /etc/pf.conf # load only the NAT rules
@motz61
motz61 / botnetservfail
Created September 17, 2021 02:57 — forked from ahupowerdns/botnetservfail
Filtering botnets that try to use your resolver as a packet amplifier
If you note that some of your users are sending you queries to weirdly named domains
(sdfhsdfkh.www.7xinggua.com. for example), and that those queries in turn are contributing
to a denial of service attack to "nameservers" behind those weirdly named domains, this page
may be for you. The instructions are for Linux, but other operating systems will offer
similar ways to filter traffic.
PowerDNS Recursor 3.6.0 out of the box comes with settings that try to limit this attack,
but there is only so much we can do. A better way is to block or deflect traffic from those
sending the queries.
@motz61
motz61 / noop_import_hook.py
Created August 22, 2021 08:53 — forked from Xion/noop_import_hook.py
"No-op" import hook
import imp
import inspect
import sys
__all__ = []
class PassthroughImporter(object):
"""Import hook that simulates the standard import flow
@motz61
motz61 / cpus.sh
Created May 22, 2021 18:17 — forked from jj1bdx/cpus.sh
Number of CPUs with getconf(1)
#!/bin/sh
# Originally from:
# https://github.com/blankpage/e5UNIXBuilder/blob/master/build-akili.sh
# Linux and similar...
CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
# FreeBSD and similar...
[ -z "$CPUS" ] && CPUS=`getconf NPROCESSORS_ONLN`
# Solaris and similar...
[ -z "$CPUS" ] && CPUS=`ksh93 -c 'getconf NPROCESSORS_ONLN'`
// m2flooder.cpp : Defines the entry point for the application.
// Copyright(c) Fallen
#include "m2flooder.h"
static bool parse_command_line(int argc, char**& argv)
{
try
{
cxxopts::Options options("m2flooder");
@motz61
motz61 / README.md
Created September 21, 2020 21:36 — forked from roachhd/README.md
EMOJI cheatsheet ๐Ÿ˜›๐Ÿ˜ณ๐Ÿ˜—๐Ÿ˜“๐Ÿ™‰๐Ÿ˜ธ๐Ÿ™ˆ๐Ÿ™Š๐Ÿ˜ฝ๐Ÿ’€๐Ÿ’ข๐Ÿ’ฅโœจ๐Ÿ’๐Ÿ‘ซ๐Ÿ‘„๐Ÿ‘ƒ๐Ÿ‘€๐Ÿ‘›๐Ÿ‘›๐Ÿ—ผ๐Ÿ”ฎ๐Ÿ”ฎ๐ŸŽ„๐ŸŽ…๐Ÿ‘ป

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. โœˆ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: ๐Ÿ˜„