Skip to content

Instantly share code, notes, and snippets.

View darvin's full-sized avatar

Stefan Novak darvin

View GitHub Profile
UIKit extensions
Android UIKit functionality beyond what is available in a few cases has to offer. Apportable SDK to access this feature includes extensions UIKit. This API is not available in the IOS, so we at Android and IOS to share the same code base with # ifdef ANDROID calls to UIKit extensions is recommended that you wrap.
This expansion of the document ~ /. Apportable / SDK / system / UIKit / used in the corresponding header file can be found.
UIResponder
The user presses the hardware back or menu button, the buttonUpWithEvent: UIResponder chain reaction method is called. To implement this method on the Back button until the application is not responding. You usually implement this method, you can also first responder to handle memory warning will shake and gesture events. Ensure that the implementation of canBecomeFirstResponder YES is returned. You if you do not use the root view controller, you also need to call becomeFirstResponder manually.
diff --git a/cocos2d/CCLabelTTF.h b/cocos2d/CCLabelTTF.h
index 062618c..fad3df1 100644
--- a/cocos2d/CCLabelTTF.h
+++ b/cocos2d/CCLabelTTF.h
@@ -252,7 +252,7 @@
*
* @param fontFile Font file path.
*/
-+(void) registerCustomTTF:(NSString*)fontFile;
++(NSString*) registerCustomTTF:(NSString*)fontFile;
@darvin
darvin / README.md
Last active September 26, 2022 16:07 — forked from davidjrice/.travis.yml
Travis CI + iOS code signing

Build ios app for iphoneos sdk with signing using Travis ci.

  1. Export your private key that you are going to use for signing from Keychain Access app to ~/privateKey.p12 with export password __YourRandomPass22
  2. Fetch script and run it from your Travis-enabled target iOS app repo: IOS_IDENTITY_KEY=~/privateKey.p12 IOS_IDENTITY_KEY_PASSWORD=__YourRandomPass22 bash <(curl -s https://gist.githubusercontent.com/darvin/96a3af399d0b970a59b1/raw/setup_travis_ios_signing.sh)
  3. Review changes and commit. It suppose to work now.
#!/bin/bash
# AMOUNT_OF_DISPLAYS=`ddcctl -h 2>&1 | perl -ne 'print "$1\n" if m/found (\d+) displays/;'`
CURRENT_BR_FILE=/tmp/.last.brightness
MAX_BR=100
MIN_BR=0
if [ -f "$CURRENT_BR_FILE" ]
then
CURRENT_BR=`cat $CURRENT_BR_FILE`
else
one finger tap
1526700179.795406 3 47 0
1526700179.795406 3 57 2
1526700179.795406 3 53 434
1526700179.795406 3 54 411
1526700179.795406 3 58 171
1526700179.795406 3 52 4
1526700179.795406 0 0 0
1526700179.840660 3 57 -1
#!/bin/bash
set -Ee
files=("$@")
if ((${#files[@]} == 0)); then
echo "files not found"
exit 3
fi
echo "TAP version 13"
#!/bin/bash
if [ -z ${PORTION_COUNT+x} ]; then
PORTION_COUNT=1
PORTION_INDEX=1
fi
a=($(wc $1))
lines=$((${a[0]} + 1))
words=${a[1]}
chars=${a[2]}
@darvin
darvin / fav_airfcraft_system.md
Last active August 2, 2020 10:30
FPV aircraft System

Main feature

Computer flight simulator (MSFS2020 or Flight Gear) running in "visualization only mode" (simulation of everything is turned off, telemetry and controls, that are going through the machine where simulator is running on, are binded to the gauges/ control surfaces of the model. GPS coordinates are matched. Scenery transparency can be tuned, behind it - pan tilt servo coordinated (or 360) video feed from analog source. If video feed is lost, scenery becomes solid.

Future development

Ona aircraft FPGA video filter

that deals with camera, and passes it, adding hdmi output from raspberry pi

NeTV2 fits the bill. May be better to opt in for digital camera.

Plugin to desktop flight simulator

Drives simulation according to data of rc compatible telemetry

Telemetry protocols

mavlink

Draws the sphere of chromakey color around aircraft, overlays a chromakey fullscreen fill

key binding (on attched to rpi joystick) - increase/decrease transparency of fullscreen fill

key binding - increase/decrease transparency of sphere