Skip to content

Instantly share code, notes, and snippets.

View MyOwnClone's full-sized avatar

Tomas Vymazal MyOwnClone

View GitHub Profile
@MyOwnClone
MyOwnClone / FlyCamera.cs
Created July 6, 2018 18:31 — forked from gunderson/FlyCamera.cs
Unity Script to give camera WASD + mouse control
using UnityEngine;
using System.Collections;
public class FlyCamera : MonoBehaviour {
/*
Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care.
Converted to C# 27-02-13 - no credit wanted.
Simple flycam I made, since I couldn't find any others made public.
Made simple to use (drag and drop, done) for regular keyboard layout
@MyOwnClone
MyOwnClone / docker-install-rpi3.md
Created December 25, 2017 21:57 — forked from tyrell/docker-install-rpi3.md
Installing latest Docker on a Raspberry Pi 3

Introduction

I wrote this gist to record the steps I followed to get docker running in my Raspberry Pi 3. The ARM ported debian version (Jessie) comes with an old version of docker. It is so old that the docker hub it tries to interact with doesn't work anymore :)

Hopefully this gist will help someone else to get docker running in their Raspberry Pi 3.

Installation

From original instructions at http://blog.hypriot.com/post/run-docker-rpi3-with-wifi/

@MyOwnClone
MyOwnClone / resize_icons.rb
Created November 14, 2017 15:17 — forked from meng-hui/resize_icons.rb
Populate a Unity generated Xcode project with all icons for a Universal build from a single icon file. In the folder with the xcode project, execute this script and by default looks for a file named icon_1024x1024.png and places all the icons needed into Unity-iPhone/Images.xcassets/AppIcon.appiconset/ . Requires gd and fastimage_resize gem
#!/usr/bin/env ruby
# make sure you have gd and fastimage_resize
# brew install gd
# sudo gem install fastimage_resize
require 'fastimage_resize'
require 'optparse'
require 'json'
require 'fileutils'
/* VT100 terminal reset (<ESC>c) */
console.log('\033c');
/* numbers comparations */
> '2' == 2
true
> '2' === 2
@MyOwnClone
MyOwnClone / Makefile
Last active August 29, 2015 14:19 — forked from skeeto/Makefile
CFLAGS = -std=c99 -Wall
main : main.o
.PHONY : test clean
test : main
./$^ "*regex*" "*vtable*" < main.c
clean :
@MyOwnClone
MyOwnClone / rpn-jit.c
Last active August 29, 2015 14:19 — forked from anonymous/rpn-jit.c
/* http://redd.it/2zna5q
* Fibonacci example:
* (1) (2) +
* 0:0
* 1:1
* 20
*/
#define _BSD_SOURCE // MAP_ANONYMOUS
#include <stdio.h>
#include <stdlib.h>
@MyOwnClone
MyOwnClone / jit.c
Last active August 29, 2015 14:19 — forked from skeeto/jit.c
/* http://redd.it/2z68di */
#define _BSD_SOURCE // MAP_ANONYMOUS
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <sys/mman.h>
#define PAGE_SIZE 4096
@MyOwnClone
MyOwnClone / .gitignore
Last active August 29, 2015 14:11 — forked from Abizern/.gitignore
# Mac OS X
*.DS_Store
# Xcode
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcuserstate
project.xcworkspace/
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target name="coloredConsole" xsi:type="ColoredConsole" useDefaultRowHighlightingRules="false"
layout="${longdate}|${pad:padding=5:inner=${level:uppercase=true}}|${message}" >
<highlight-row condition="level == LogLevel.Debug" foregroundColor="DarkGray" />
<highlight-row condition="level == LogLevel.Info" foregroundColor="Gray" />
<highlight-row condition="level == LogLevel.Warn" foregroundColor="Yellow" />