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
// Requires NDC from GetVertexPositionInputs() in the vert shader | |
float2 GetNoiseUV(float2 positionNDC) { | |
float2 blueTexSizeMultiplier = _BlueNoise_TexelSize.xy; // i.e. 1/32 | |
float2 screenWidthHeight = _ScreenParams.xy + float2(0.5, 0.5); // i.e. 1920,1080 + half to center | |
return screenWidthHeight * blueTexSizeMultiplier * positionNDC; | |
} |
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
"""Sync Mastodon bookmarks to Linkding | |
This script will automatically fetch a user's bookmarks from a | |
Mastodon instance. If the bookmark is not yet present in the | |
Linkding bookmark site, it's created as an unread, along with | |
any other things like custom tags. | |
If the bookmarked Mastodon toot only contains one link, excluding | |
any others like user mentions and hashtags, then that link is | |
used for the bookmark URL, instead of the toot itself. |
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 static class AutoBuilder | |
{ | |
static string defaultBundleIdentifier = "com.yourcompany.yourproduct"; | |
static string[] GetScenePaths() | |
{ | |
List<string> scenes = new List<string>(); | |
for (int i = 0; i < EditorBuildSettings.scenes.Length; i++) | |
{ |
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
- (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken | |
{ | |
NSUInteger dataLength = deviceToken.length; | |
if (dataLength > 0) { | |
const unsigned char *dataBuffer = (const unsigned char *)deviceToken.bytes; | |
NSMutableString *hexString = [NSMutableString stringWithCapacity:(dataLength * 2)]; | |
for (int i = 0; i < dataLength; ++i) { | |
[hexString appendFormat:@"%02x", dataBuffer[i]]; | |
} | |
NSLog(@"APNS Test: deviceToken=%@", hexString); |
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
require 'tempfile' | |
require 'fileutils' | |
puts ARGV.inspect | |
base_path = "unity-project" | |
file_suffixes = ["*.unity", "*.prefab", "*.controller", "*.mat"] | |
$unity_loose_file_id = "11500000" # unity hardcoded value | |
source_data = """ |
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
‘vide’/‘420v’ 192x 144, { 1- 60 fps}, HRSI:4032x3024, fov:64.720, no bin, no vis, max zoom:189.00 (upscales @21.00), AF System:2, ISO:34.0-3264.0, SS:0.000014-1.000000, supports HDR, no wide color support, no multicam | |
’vide’/‘420f’ 192x 144, { 1- 60 fps}, HRSI:4032x3024, fov:64.720, no bin, no vis, max zoom:189.00 (upscales @21.00), AF System:2, ISO:34.0-3264.0, SS:0.000014-1.000000, supports HDR, supports wide color, no multicam | |
’vide’/‘420v’ 352x 288, { 1- 60 fps}, HRSI:3696x3024, fov:59.327, no bin, no vis, max zoom:189.00 (upscales @10.50), AF System:2, ISO:34.0-3264.0, SS:0.000014-1.000000, supports HDR, no wide color support, no multicam | |
’vide’/‘420f’ 352x 288, { 1- 60 fps}, HRSI:3696x3024, fov:59.327, no bin, no vis, max zoom:189.00 (upscales @10.50), AF System:2, ISO:34.0-3264.0, SS:0.000014-1.000000, supports HDR, supports wide color, no multicam | |
’vide’/‘420v’ 480x 360, { 1- 60 fps}, HRSI:4032x3024, fov:64.720, no bin, no vis, max zoom:189.00 (upscales @ |
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
# vector.py | |
from math import sqrt | |
class Vector3(object): | |
""" | |
3-D vector implementation. | |
Purpose: Provide | |
* Core functionality to ray tracing implementation. |
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
{"Narenses":{"x":-1.15625,"y":-11.03125,"z":21.875},"George Pantazis":{"x":-12.09375,"y":-16,"z":-14.21875},"Barnards Star":{"x":-3.03125,"y":1.375,"z":4.9375},"Hill Pa Hsi":{"x":29.46875,"y":-1.6875,"z":25.375},"Epsilon Indi":{"x":3.125,"y":-8.875,"z":7.125},"Haghole":{"x":-5.875,"y":0.90625,"z":23.84375},"Ross 671":{"x":-17.53125,"y":-13.84375,"z":0.625},"Karsinanari":{"x":-29.875,"y":-46.1875,"z":-8.03125},"LP 532-81":{"x":-1.5625,"y":-27.375,"z":-32.3125},"Wolf 1481":{"x":5.1875,"y":13.375,"z":13.5625},"Wolf 25":{"x":-11.0625,"y":-20.46875,"z":-7.125},"Trepin":{"x":26.375,"y":10.5625,"z":9.78125},"Alpha Centauri":{"x":3.03125,"y":-0.09375,"z":3.15625},"Luyten 145-141":{"x":13.4375,"y":-0.8125,"z":6.65625},"LP 525-39":{"x":-19.71875,"y":-31.125,"z":-9.09375},"Wolf 124":{"x":-7.25,"y":-27.15625,"z":-19.09375},"LP 245-10":{"x":-18.96875,"y":-13.875,"z":-24.28125},"Epsilon Eridani":{"x":1.9375,"y":-7.75,"z":-6.84375},"Stein 2051":{"x":-9.46875,"y":2.4375,"z":-15.375},"WISE 0855-0714":{"x":6.53125,"y":-2.15625 |
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 sys | |
import time | |
import json | |
import random | |
import operator | |
from enum import Enum | |
import vector | |
import networkx as nx |
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
Shader "Custom/XRayTransparency" | |
{ | |
Properties | |
{ | |
_RimColor ("Rim Color", Color) = (0.26,0.19,0.16,0.0) | |
_RimPower ("Rim Power", Range(0.5,8.0)) = 3.0 | |
} | |
SubShader | |
{ |