Skip to content

Instantly share code, notes, and snippets.

View negue's full-sized avatar
👨‍💻
Nerding around

negue

👨‍💻
Nerding around
View GitHub Profile
@negue
negue / NinePatchGroup.js
Created March 1, 2014 01:23
Phaser NinePatchGroup
/**
* NinePatchGroup
*
* @author Negue
* @extends {Phaser.Group}
* @param game
* @constructor
*/
var NinePatchGroup = function (game, x, y, targetWidth, targetHeight, imageKey) {
Phaser.Group.call(this, game);
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--Includes all tasks and build modification needed for correct transformation work-->
<UsingTask TaskName="TransformXml"
AssemblyFile="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.Tasks.dll" />
<ItemDefinitionGroup>
<!-- Set the default value to false here -->
<None>
<TransformOnBuild>false</TransformOnBuild>
@negue
negue / Unity-WinRT.cs
Last active April 1, 2016 21:32
Unity Extensions for WinRT
// Just if you change / add anything and have Intelli-Sense / highlighting in the editor
// remember to uncomment for testing in unity
//#define ENABLE_CHANGES
#if ENABLE_CHANGES
#define UNITY_WINRT
#undef UNITY_EDITOR
#endif
using UnityEngine;

Keybase proof

I hereby claim:

  • I am negue on github.
  • I am negue (https://keybase.io/negue) on keybase.
  • I have a public key ASDITBx5miHX4HxPvwFSWH2KnGzmt_owOG5_Ky0KJ4k32go

To claim this, I am signing this object:

@negue
negue / dynamic-loader.component.ts
Last active April 26, 2020 10:00
Lazy Component Loader
import {
Component,
ChangeDetectionStrategy,
ViewChild,
ViewContainerRef,
ComponentFactoryResolver,
Injector, Input, OnChanges,
SimpleChanges, EventEmitter, OnDestroy, Output, ChangeDetectorRef, OnInit
} from '@angular/core';
import {takeUntil} from 'rxjs/operators';
@negue
negue / gun.callfallback.ts
Created November 29, 2019 20:46
gun call-/fallback
private callFallback<T> (functionName: 'once'|'load', timeout: number, defaultValue: T): Promise<T> {
return new Promise(resolve => {
let timeoutCalled = false;
const stopTimeout = setTimeout(() => {
timeoutCalled = true;
this.zone.run(() => resolve(defaultValue));
}, timeout);
this.gun[functionName](data => {
if (timeoutCalled) {
@negue
negue / example-emoji-list.ts
Last active April 25, 2020 19:08
Beware: Using this file with typescript will result in a `ERROR in Maximum call stack size exceeded` Error :D
export const emojiExampleList = ':100:\n' +
':1234:\n' +
':+1:\n' +
':-1:\n' +
':1st_place_medal:\n' +
':2nd_place_medal:\n' +
':3rd_place_medal:\n' +
':8ball:\n' +
':a:\n' +
':ab:\n' +
@negue
negue / clock.html
Last active March 28, 2021 00:34 — forked from sam0737/clock.html
OBS Studio: A HTML page for showing current date and time in the video
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>A simple clock</title>
<style>
html, body {
overflow: hidden;
}
function deepFreeze (o) {
Object.freeze(o);
Object.getOwnPropertyNames(o).forEach(function (prop) {
if (o.hasOwnProperty(prop)
&& o[prop] !== null
&& (typeof o[prop] === "object" || typeof o[prop] === "function")
&& !Object.isFrozen(o[prop])) {
deepFreeze(o[prop]);
}
<ng-container *ngFor="let item of reverseStrings$ | async">
<ng-container
[ngTemplateOutlet]="string"
[ngTemplateOutletContext]="item"
></ng-container>
</ng-container>