Skip to content

Instantly share code, notes, and snippets.

View naithar's full-sized avatar
:octocat:

Sergey Minakov naithar

:octocat:
  • Moscow
View GitHub Profile
@naithar
naithar / 3.2.gd
Last active March 18, 2023 14:38
Godot iOS Safe Area
extends MarginContainer
onready var viewport = get_viewport()
onready var screen_size = viewport.get_visible_rect().size
func _ready():
viewport.connect("size_changed", self, "resize_window")
update_safe_area()
func resize_window():
@naithar
naithar / Apple_mobile_device_types.txt
Created September 30, 2020 19:49 — forked from adamawolf/Apple_mobile_device_types.txt
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
iPhone5,1 : iPhone 5 (GSM)
@naithar
naithar / Last Shaders.md
Last active July 26, 2020 13:56
Simple Logs
iPhone 6

Estimated original GLSL:
#version 450
layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
@naithar
naithar / errors_iPadPro
Last active July 22, 2020 14:35
iOS Godot Vulkan
2020-07-16 22:25:11.637163+0300 godot_app[2143:2238915] Compiler failed to build request
2020-07-16 22:25:11.640736+0300 godot_app[2143:2238915] Compiler failed to build request
[mvk-error] VK_ERROR_INITIALIZATION_FAILED: Compute pipeline compile failed (Error code 3):
Total number of indirect argument buffer resources exceeded for textures (33/31).
2020-07-16 22:25:11.641284+0300 godot_app[2143:2238664] ERROR: - Message Id Number: 0 | Message Id Name:
VK_ERROR_INITIALIZATION_FAILED: Compute pipeline compile failed (Error code 3):
Total number of indirect argument buffer resources exceeded for textures (33/31).
Objects - 1
Object[0] - VK_OBJECT_TYPE_PIPELINE, Handle 10758641280
@naithar
naithar / README.md
Created May 31, 2019 06:30 — forked from JohannesMP/LICENSE
[Unity3D] A Reliable, user-friendly way to reference SceneAssets by script.

What is this?

A SceneReference wrapper class that uses ISerializationCallbackReceiver and a custom PropertyDrawerto provide safe, user-friendly scene references in scripts.

![alt text][1]

Why is this needed?

#![allow(dead_code)]
/// Create method to access field of sub-resource
///
/// Similar to ActiveSupport's [`delegate`].
///
/// [`delegate`]: http://api.rubyonrails.org/classes/Module.html#method-i-delegate
///
/// # Limitations
///
@naithar
naithar / .gitignore
Created March 13, 2017 09:29
Gitignore
# Xcode
#
## Build generated
build/
DerivedData/
## Various settings
@naithar
naithar / TestURLSessionServer_changes.swift
Last active March 7, 2017 13:29
Foundation HTTP testing
public class TestURLSessionServer {
let capitals: [String:String] = ["Nepal":"Kathmandu",
"Peru":"Lima",
"Italy":"Rome",
"USA":"Washington, D.C.",
"country.txt": "A country is a region that is identified as a distinct national entity in political geography"]
let httpServer: _HTTPServer
let delay: TimeInterval?
import Stencil
let text = "{% exact %} {{aaa}} {% endexact %}"
let ext = Extension()
class ExactNode: NodeType {
let string: String
init(_ string: String) {
function webRequest(url, data, callback, target) {
var http = new XMLHttpRequest();
if(!data){ mode="GET"; } else { mode="POST"; }
http.open(mode, url, true);
if(mode=="POST"){ http.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); }
http.onreadystatechange = function(){ if(http.readyState==4){ callback(http.responseText,target); }};
http.send(data);
}
//http://stackoverflow.com/questions/247483/http-get-request-in-javascript