Skip to content

Instantly share code, notes, and snippets.

View flashfoxter's full-sized avatar
🏠
Working from home

Konstantin Le flashfoxter

🏠
Working from home
View GitHub Profile
# !/bin/bash
# Copyright (c) 2011 Float Mobile Learning
# http://www.floatlearning.com/
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
@flashfoxter
flashfoxter / app.js
Created December 1, 2013 19:56 — forked from niallo/app.js
var mailer = require('nodemailer')
var Hapi = require('hapi')
var util = require('util')
var template = require('swig')
var path = require('path')
var PORT = process.env.PORT || 8080
var server = new Hapi.Server(PORT)
template.init({
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});
var target : Transform;
function Update(){
//the direction vector to target
var dir = (target.position - transform.position).normalized;
var hit :RaycastHit;
if (Physics.Raycast(transform.position,transform.forward,hit ,20)){
//no self collision
if(hit.transform !=transform)
/* Implement the circular scrolling list on Unity3D.
* Author: LanKuDot < https://github.com/LanKuDot; [email protected] >
*/
using UnityEngine;
using System.Collections;
public class ListBox: MonoBehaviour
{
public int listBoxID;
public int numOfListBox;
@flashfoxter
flashfoxter / EventMapFragment.java
Created November 5, 2015 11:34 — forked from LuckOfWise/EventMapFragment.java
MapFragmentをTabの要素として表示したい to @shikajiro
package jp.kickhost.eventnavi;
import java.util.ArrayList;
import jp.kickhost.localsearch.model.Event;
import android.app.Fragment;
import android.os.Bundle;
import android.text.format.Time;
import android.util.Log;
import android.view.InflateException;
@flashfoxter
flashfoxter / AlphanumComparatorFast.cs
Created December 23, 2015 14:15 — forked from ngbrown/AlphanumComparatorFast.cs
Alphanumeric compariter using Linq and an EnumerableComparer.
namespace Utilities
{
using System.Collections;
using System.Collections.Generic;
/// <remarks>
/// From http://www.dotnetperls.com/alphanumeric-sorting
/// </remarks>
public class AlphanumComparatorFast : IComparer<string>, IComparer
{
@flashfoxter
flashfoxter / drag-drop-wpf.cs
Created January 5, 2016 05:01 — forked from cabrel/drag-drop-wpf.cs
Drag & Drop in C# w/ WPF
// WPF Canvas Object
// Canvas LayoutCanvas;
//
// Events Required
//
// Canvas_PreviewMouseLeftButtonDown
// Canvas_PreviewMouseMove
// Canvas_PreviewMouseLeftButtonUp
// Parent_PreviewKeyDown
//
@flashfoxter
flashfoxter / CleanUpWindow.cs
Created June 14, 2016 22:41 — forked from karl-/CleanUpWindow.cs
New interface for removing unused Unity assets
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Collections;
using System.Collections.Generic;
public class CleanUpWindow : EditorWindow
{
bool groupEnabled = true;
List<string> usedAssets = new List<string>();
@flashfoxter
flashfoxter / gist:e080baba0bd664ba9d376e4792ff69e6
Created June 16, 2016 11:21 — forked from hanssens/gist:8182406
Fix for the UnauthorizedAccessException in Xamarin Studio (MonoDevelop) when running a MVC 4/5 website on Mac OSX.

Fix for the UnauthorizedAccessException in Xamarin Studio

This is a fix for the UnauthorizedAccessException in Xamarin Studio (MonoDevelop) when running a MVC 4/5 website on Mac OSX.

The error:

System.UnauthorizedAccessException
Access to the path "/Library/Frameworks/Mono.framework/Versions/3.2.5/etc/mono/registry" is denied.