Skip to content

Instantly share code, notes, and snippets.

@wtrebella
wtrebella / WTDrawingPolygonsScene.cs
Last active December 16, 2015 13:48
This is a collection of classes that will allow you to simply make an array of vertices and have them drawn on screen as a polygon (with a solid color). You will also be able to collide a circle with that polygon, or just get the vertex points based on its rotation, scale, and position.
using UnityEngine;
using System.Collections;
// This is just an example of how to use the polygon sprite
public class WTDrawingPolygonsScene : MonoBehaviour {
void Start () {
FutileParams fp = new FutileParams(true, true, false, false);
fp.AddResolutionLevel(480f, 1.0f, 1.0f, "-res1");
fp.backgroundColor = Color.black;
fp.origin = Vector2.zero;
require 'optparse'
require 'xcodeproj'
options = {}
OptionParser.new do |opts|
opts.banner = " This script fills \"Compile sources\" and add headers to the project section. \n
Usage: fill_sources_headers.rb [options]"
opts.on("-s [sources_path]", "--sources [sources_path]", "Path to the sources files (required)") do |sources_path|
@frazei
frazei / RG350.md
Last active March 13, 2021 02:16
RG350 USB Internet Access on OSX

RG350 accesso Internet su OSX tramite USB

Read this in english

Il primo metodo (condivisione internet) ha il vantaggio di essere leggermente più semplice ma lo svantaggio che la RG350 sarà nattata dietro al mac. Il secondo metodo (interfaccia in bridge) è leggermente più complesso ma permette alla RG di essere direttamente nella rete locale.

Nota: purtroppo entrambe le procedure non sono persistenti al riavvio della RG350. Ogni volta che si spegne perde l'interfaccia poichè al momento non ho capito come fare a scrivere su /etc/network/interfaces che è readonly.

Metodo 1: condivisione internet

  1. Attivare condivisione internet sul mac:
  • Preferenze di Sistema > Condivisione > Condividi la tua connessione da: Wi-Fi (oppure USB 10/100/1000 LAN)
@macromorgan
macromorgan / README.md
Last active January 20, 2024 17:30
Debootstrap Development Image

Start with making your "flashable" image. I use 2GB and work from there. fallocate can work too, but some filesystems may not support it.

dd if=/dev/zero of=disk.img bs=1M count=2048

Create your partitions on the disk. I use fdisk and generate a gpt partition table. Note that I leave a slight offset (16MB) for U-Boot and the Rockchip loader stuff, but in my case I will be using U-Boot from the internal SPI and the storage space is entirely optional.

fdisk disk.img

I create my first partition at offset 32768 (16MB exactly) and have it end at 294911 (128MB + 16MB). This gives my boot partition 128MB to work with and ensures that my root partition starts at sector 294912. When working with 512 byte blocks (which we almost always are) it's important to ensure your starting block numbers are always divisible by 8 so that they are 4k aligned.