Skip to content

Instantly share code, notes, and snippets.

Alejandro t0chas

Block or report user

Report or block t0chas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@t0chas
t0chas / exportPemCertificate.sh
Created Jul 5, 2017
Export APNS Certificate as PEM
View exportPemCertificate.sh
#!/bin/sh
CERTIFICATE_FROM_APPLE="$1"
CERTIFICATE_KEY="$2"
PASSWORD="$3"
if ! [ -e "$1" ] ; then
echo "CERTIFICATE_FROM_APPLE is missing."
echo "usage:\n\t $0 CERTIFICATE_FROM_APPLE.cer CERTIFICATE_KEY.p12 PASSWORD"
exit 1;
fi
@t0chas
t0chas / land_v2.ks
Created Nov 30, 2016
KSP kOS mod - Landing script
View land_v2.ks
RUN ONCE surfaceLib.
DECLARE LOCAL runmode to 0.
DECLARE LOCAL impactTimeDelta to 0.
DECLARE LOCAL impactTimeStamp to 0.
DECLARE LOCAL pos to 0.
DECLARE LOCAL impactGeoPos to 0.
DECLARE LOCAL impactVel to 0.
DECLARE LOCAL deltaV to 0.
DECLARE LOCAL max_acc to 0.
@t0chas
t0chas / ProductItems.cs
Last active Nov 30, 2016
Json.Net.Unity3D struct example
View ProductItems.cs
[System.Serializable]
public struct ProductItems
{
public static readonly ProductItems Default = default(ProductItems);
public string ProductId { get; set; }
public int Count { get; set; }
public ProductItems(string productId, int count)
{
@t0chas
t0chas / getBuildNumberByDate.go
Created Nov 23, 2016
Use the current date as BuildNumber on Xcode projects build with Bitrise.
View getBuildNumberByDate.go
package main
import (
"fmt"
"os"
"os/exec"
"time"
)
// RunEnvmanAdd ...
@t0chas
t0chas / launch_v4.ks
Last active Jun 15, 2016
A kOS script for KSP. Deploy a CommSat to low Kerbin Orbit (LKO) using a kOS script to handle launch, staging and circularization, without having a proper signal relay network (RemoteTech only).
View launch_v4.ks
clearscreen.
set headingAngle to 90. //normal EAST
set targetApoapsis to 150000. //Target apoapsis in meters
set targetPeriapsis to 150000. //Target periapsis in meters
lock throttle to 0. //Throttle is a decimal from 0.0 to 1.0
gear off.
set runmode to 0. //Safety in case we start mid-flight
if SHIP:STATUS = "PRELAUNCH"{
set runmode to 1.
@t0chas
t0chas / CustomDefines.cs
Created Mar 19, 2016
Manage your Unity3D symbols easily within the Editor by defining menu items
View CustomDefines.cs
using UnityEngine;
using UnityEditor;
public class CustomDefines {
[MenuItem("Global Defines/My Symbol/Enable")]
public static void EnableDebug(){
Debug.LogWarning("Enabling MY_SYMBOL");
var defines = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup);
string newDefine = "MY_SYMBOL";
@t0chas
t0chas / CustomEditorBase.cs
Last active Nov 20, 2019
Default Custom Inspector-Editor for Unity3D with ReorderableLists for arrays handling
View CustomEditorBase.cs
using UnityEngine;
using UnityEditor;
using UnityEditorInternal;
using System.Collections.Generic;
using UnityEditor.AnimatedValues;
[CustomEditor(typeof(UnityEngine.Object), true, isFallback = true)]
[CanEditMultipleObjects]
public class CustomEditorBase : Editor
{
You can’t perform that action at this time.