Данная пошаговая инструкция поможет освоить основы на простом примере
Для справки
Сервер поднимался на Debian 8 c характеристиками:
CPU - 1 ядро x 500 МГц
| 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 |
| // Файл "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". |
| defaults write com.apple.dock size-immutable -bool true; killall Dock |
| #!/bin/sh | |
| # by: "John Hazelwood" <[email protected]> | |
| # | |
| # 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 |
| "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 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
$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/
| 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"); |
| public class SimpleAsyncHost | |
| { | |
| private HttpListener _httpListener; | |
| private bool _stop; | |
| public SimpleAsyncHost() | |
| { | |
| _httpListener = new HttpListener(); | |
| _httpListener.Prefixes.Add("http://localhost:10090/"); |