Skip to content

Instantly share code, notes, and snippets.

View karaketir16's full-sized avatar
😑

Osman Karaketir karaketir16

😑
  • ASELSAN
  • Ankara
  • 11:33 (UTC +03:00)
View GitHub Profile
@mandrean
mandrean / Install Arm Embedded GCC toolchain on Apple M1 Silicon (aarch64, arm64)
Last active March 31, 2024 14:29
Install xPack GNU Arm Embedded GCC toolchain on Apple M1 Silicon (aarch64 / arm64)
# 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
@SteveBate
SteveBate / struct_to_bytes.go
Created October 2, 2015 14:32
Example of converting a struct to a byte slice, compressing with gzip, and saving to file followed by the reverse process back to a struct
package main
import (
"bytes"
"compress/gzip"
"encoding/gob"
"fmt"
"io/ioutil"
"log"
"os"
@abinashmeher999
abinashmeher999 / comp_macros.h
Created July 27, 2015 13:19
Some of the most used macros in competitive programming
#include <cmath>
#include <climits>
#include <queue>
#include <vector>
#include <map>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <sstream> // istringstream buffer(myString);
@aVolpe
aVolpe / Vibration.cs
Created October 16, 2014 02:45
Vibration for Unity3d with Android native Call, with fallback to Handlheld.Vibrate()
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");
@pavelvpster
pavelvpster / GStreamer-images-to-AVI.sh
Last active January 17, 2021 12:25
GStreamer convert image set to AVI (H264 encoding).
gst-launch-0.10 multifilesrc location="./images/image-%06d.jpg" \
! "image/jpeg,framerate=12/1" \
! jpegparse \
! jpegdec \
! x264enc \
! avimux \
! filesink location=video.avi
// 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');
@andresv
andresv / ax25_crc16.c
Last active July 16, 2024 15:59
AX25 CRC16 implementation
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
};