Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
Nerding around

negue

👨‍💻
Nerding around
View GitHub Profile
View WORKING.html
<ng-container *ngFor="let item of reverseStrings$ | async">
<ng-container
[ngTemplateOutlet]="string"
[ngTemplateOutletContext]="item"
></ng-container>
</ng-container>
View gist:6af9fcd38d4b04dc9a3565c4c19ce819
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]);
}
@negue
negue / clock.html
Last active Mar 28, 2021 — forked from sam0737/clock.html
OBS Studio: A HTML page for showing current date and time in the video
View clock.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>A simple clock</title>
<style>
html, body {
overflow: hidden;
}
@negue
negue / example-emoji-list.ts
Last active Apr 25, 2020
Beware: Using this file with typescript will result in a `ERROR in Maximum call stack size exceeded` Error :D
View example-emoji-list.ts
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' +
View gun.callfallback.ts
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 / dynamic-loader.component.ts
Last active Apr 26, 2020
Lazy Component Loader
View dynamic-loader.component.ts
import {
Component,
ChangeDetectionStrategy,
ViewChild,
ViewContainerRef,
ComponentFactoryResolver,
Injector, Input, OnChanges,
SimpleChanges, EventEmitter, OnDestroy, Output, ChangeDetectorRef, OnInit
} from '@angular/core';
import {takeUntil} from 'rxjs/operators';
View keybase.md

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 / Unity-WinRT.cs
Last active Apr 1, 2016
Unity Extensions for WinRT
View Unity-WinRT.cs
// 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;
View TransformFiles.targets
<?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 / NinePatchGroup.js
Created Mar 1, 2014
Phaser NinePatchGroup
View NinePatchGroup.js
/**
* NinePatchGroup
*
* @author Negue
* @extends {Phaser.Group}
* @param game
* @constructor
*/
var NinePatchGroup = function (game, x, y, targetWidth, targetHeight, imageKey) {
Phaser.Group.call(this, game);