$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/
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 SimpleAsyncHost | |
{ | |
private HttpListener _httpListener; | |
private bool _stop; | |
public SimpleAsyncHost() | |
{ | |
_httpListener = new HttpListener(); | |
_httpListener.Prefixes.Add("http://localhost:10090/"); |
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 System.Collections; | |
public static class Vibration | |
{ | |
#if UNITY_ANDROID && !UNITY_EDITOR | |
public static AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); | |
public static AndroidJavaObject currentActivity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity"); | |
public static AndroidJavaObject vibrator = currentActivity.Call<AndroidJavaObject>("getSystemService", "vibrator"); |
This requires the latest version of apktool.
apktool d $APK_PATH -o $OUTPUT_FOLDER
# Open the apktool.yml text file
# Alter the versionCode and versionName entries
# now rebuild!
apktool build $OUTPUT_FOLDER
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
"The common wisdom of "don't use conditionals in shaders" is one of my biggest frustrations with how shaders are taught. | |
step(y, x) _is_ a conditional! It compiles to identical code as: | |
float val = (x >= y ? 1.0 : 0.0) | |
or | |
float val = 0.0; | |
if (x >= y) val = 1.0;" | |
https://twitter.com/bgolus/status/1235254923819802626 | |
// Performing shader divisions without diving *rcp = approximation of 1/x | |
float myDividedVal = myValToDivide * rcp(myDivider); |
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
#!/bin/sh | |
# by: "John Hazelwood" <jhazelwo@users.noreply.github.com> | |
# | |
# iptables rules to only allow VPN traffic AND let user SSH to VPN server itself. | |
# Use this on a CentOS/RedHat server you have set up to be a NAT firewall for your network. | |
# This will force ALL Internet traffic to go over the VPN | |
# and will BLOCK ALL Internet TRAFFIC if VPN is not running! | |
# | |
# use `service iptables save` to save the rules to /etc/sysconfig/iptables | |
# made |
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
defaults write com.apple.dock size-immutable -bool true; killall Dock |
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
Show hidden characters
// Файл "tsconfig.json": | |
// - устанавливает корневой каталог проекта TypeScript; | |
// - выполняет настройку параметров компиляции; | |
// - устанавливает файлы проекта. | |
// Присутствие файла "tsconfig.json" в папке указывает TypeScript, что это корневая папка проекта. | |
// Внутри "tsconfig.json" указываются настройки компилятора TypeScript и корневые файлы проекта. | |
// Программа компилятора "tsc" ищет файл "tsconfig.json" сначала в папке, где она расположена, затем поднимается выше и ищет в родительских папках согласно их вложенности друг в друга. | |
// Команда "tsc --project C:\path\to\my\project\folder" берет файл "tsconfig.json" из папки, расположенной по данному пути. | |
// Файл "tsconfig.json" может быть полностью пустым, тогда компилятор скомпилирует все файлы с настройками заданными по умолчанию. | |
// Опции компилятора, перечисленные в командной строке перезаписывают собой опции, заданные в файле "tsconfig.json". |
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
By default, when extracts the Xcode.zip, | |
macos will create tmp file in `/private/var/folders/v2/tbmrn60d2910x3w23ys5fgs00000gn/T/com.apple.AUHelperService`. | |
Sometimes, the /private has no ehough space to hold 19GB Xcode.app. | |
Thus we can create a soft link named `com.apple.AUHelperService` in the tmp dir. | |
Steps: | |
1. BACKUP `com.apple.AUHelperService` in `/private/var/folders/v2/tbmrn60d2910x3w23ys5fgs00000gn/T/` to `com.apple.AUHelperService_BACKUP` | |
2. mkdir named `com.apple.AUHelperService` wherever you have enough space, | |
3. ln -s /your/absolute/path/com.apple.AUHelperService /private/var/folders/v2/tbmrn60d2910x3w23ys5fgs00000gn/T | |
4. double click the Xcode.xip |
OlderNewer