This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.net.NetworkInterface; | |
import java.net.SocketException; | |
import java.util.Enumeration; | |
public class TestNetworkInterfaces { | |
public static void main(String[] args) { | |
boolean returned = false; | |
try { | |
Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces(); | |
while (networkInterfaces.hasMoreElements()) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
public class SaveRenderTextureToFile { | |
[MenuItem("Assets/Save RenderTexture to file")] | |
public static void SaveRTToFile() | |
{ | |
RenderTexture rt = Selection.activeObject as RenderTexture; | |
RenderTexture.active = rt; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A script to generate and register an OpenVR manifest in a Unity-friendly way | |
// OpenVR manifest lets you show proper app name in SteamVR status screen instead of process name, set a custom image for the loading screen in compositor or even allow to launch your game from Steam interface | |
// Feel free to do anything you want with this script, but please keep this copyright notice intact. | |
// https://gist.github.com/krzys-h/98464aa2f4a1ad814358f8f078111366 | |
// Author: krzys_h, 2018-02-11 | |
// Usage: | |
// Put this script anywhere in your assets folder | |
// Click Edit > Project Settings > OpenVR Manifest | |
// Fill in the settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import struct | |
import os | |
import sys | |
PACKAGE_HEADER = "<I" | |
FILE_HEADER = "<32sII" | |
print("FunPack 3D .WFA unpacker by krzys_h") | |
if len(sys.argv) != 2: | |
print("Usage: {} path_to_file.wfa".format(sys.argv[0])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove sid= from query string plugin for HTTrack | |
// by krzys_h, 2018-05-15 | |
// https://gist.github.com/krzys-h/4717608089c54f733083fd390e5c0f2b | |
// This makes HTTrack automatically remove the sid= parameter from URLs it visits, as there is no way this can be done with commandline parameters (see https://forum.httrack.com/readmsg/27508/index.html) | |
// Compilation and usage: | |
// gcc -shared -o wrapper.so -fPIC -I/usr/include/httrack wrapper.c | |
// httrack --wrapper ./wrapper.so ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#kazet mnie zabije | |
# 2 sfArk ELF executable | |
unset LD_TRACE_LOADED_OBJECTS | |
cat $(find / -iname flag.txt) | |
# When you run 'file -b asdf' on this, it will print "asdf: sfArk compressed Soundfont Version kazet mnie zabije : ELF executable" | |
# When you run './asdf', it will execute code | |
# see https://github.com/markusnussbaum/binaryanalyzer/compare/ee35ecf5c89313df575ad6c6d0109aa0f9b7dc01...fa1eae1f7393c4fb5de57d9a46dadbb674da50cb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UnityWebRequestAwaiter : INotifyCompletion | |
{ | |
private UnityWebRequestAsyncOperation asyncOp; | |
private Action continuation; | |
public UnityWebRequestAwaiter(UnityWebRequestAsyncOperation asyncOp) | |
{ | |
this.asyncOp = asyncOp; | |
asyncOp.completed += OnRequestCompleted; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socketserver | |
import struct | |
class GameMakerTCPHandler(socketserver.StreamRequestHandler): | |
def handle(self): | |
print("{} trying to connect".format(self.client_address[0])) | |
self.wfile.write(b"GM:Studio-Connect\0") | |
r = struct.unpack('IIII', self.rfile.read(16)) | |
if r[0] != 0xcafebabe or r[1] != 0xdeadb00b or r[2] != 16: | |
raise Exception("Not a GameMaker client") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/decomp_normal/gml_Object_DEVICE_CONTACT_Step_0.gml b/decomp_switch/gml_Object_DEVICE_CONTACT_Step_0.gml | |
index e58927a..9b72f5e 100755 | |
--- a/decomp_normal/gml_Object_DEVICE_CONTACT_Step_0.gml | |
+++ b/decomp_switch/gml_Object_DEVICE_CONTACT_Step_0.gml | |
@@ -713,14 +713,20 @@ if (self.EVENT == 67) | |
{ | |
global.name = self.CHOICE.NAMESTRING | |
self.FN_2 = global.name | |
- if (global.lang == "ja") | |
+ if (self.FN_2 == "GASTER") |
OlderNewer