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
# Install xpm using npm | |
$ npm install --global xpm@latest | |
# Install xPack distribution of Arm toolchain with Apple M1 Silicon support | |
$ xpm install @xpack-dev-tools/[email protected] | |
# Add Arm toolchain binaries to PATH in your .bashrc or .zshrc | |
$ echo 'export PATH="$HOME/Library/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/10.3.1-2.3.1/.content/bin:$PATH"' >> ~/.bashrc | |
$ source ~/.bashrc |
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
package main | |
import ( | |
"bytes" | |
"compress/gzip" | |
"encoding/gob" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" |
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
#include <cmath> | |
#include <climits> | |
#include <queue> | |
#include <vector> | |
#include <map> | |
#include <cstdlib> | |
#include <fstream> | |
#include <iomanip> | |
#include <iostream> | |
#include <sstream> // istringstream buffer(myString); |
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 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
gst-launch-0.10 multifilesrc location="./images/image-%06d.jpg" \ | |
! "image/jpeg,framerate=12/1" \ | |
! jpegparse \ | |
! jpegdec \ | |
! x264enc \ | |
! avimux \ | |
! filesink location=video.avi |
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
// Restify Server CheatSheet. | |
// More about the API: http://mcavage.me/node-restify/#server-api | |
// Install restify with npm install restify | |
// 1.1. Creating a Server. | |
// http://mcavage.me/node-restify/#Creating-a-Server | |
var restify = require('restify'); |
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
uint16_t ax25crc16(unsigned char *data_p, uint16_t length) { | |
uint16_t crc = 0xFFFF; | |
uint32_t data; | |
uint16_t crc16_table[] = { | |
0x0000, 0x1081, 0x2102, 0x3183, | |
0x4204, 0x5285, 0x6306, 0x7387, | |
0x8408, 0x9489, 0xa50a, 0xb58b, | |
0xc60c, 0xd68d, 0xe70e, 0xf78f | |
}; |