This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function getConsole(name: string, color: string) { | |
const newConsole : Console = Object.create(console); | |
newConsole.log = console.log.bind(console, `%c[${name}]`, `color: ${color}`); | |
newConsole.warn = console.warn.bind(console, `[${name}]`); | |
newConsole.error = console.error.bind(console, `[${name}]`); | |
newConsole.time = (label?: string) => console.time(`[${name}] ${label}`); | |
newConsole.timeEnd = (label?: string) => console.timeEnd(`[${name}] ${label}`); | |
return newConsole; | |
} |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"missionRewards": { | |
"Mercury": { | |
"Apollodorus": { | |
"gameMode": "Survival", | |
"isEvent": false, | |
"rewards": { | |
"A": [ | |
{ | |
"_id": "fc25008a1520110a9534065e0d1e3765", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using Hangfire.Client; | |
using Hangfire.Common; | |
using Hangfire.States; | |
using Hangfire.Storage; | |
/// <summary> | |
/// Makes sure that 2 (or more) same jobs will not be run twice at the same time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace rlike | |
{ | |
class Program | |
{ | |
static Random Rng; | |
static void Main(string[] args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Collections.Concurrent; | |
using System.Threading.Tasks; | |
using System.Threading; | |
namespace TestProject | |
{ | |
class Program | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fossil -> Git | |
git init new-repo | |
cd new-repo | |
fossil export --git ../repo.fossil | git fast-import | |
git merge trunk | |
git branch -d trunk | |
Git -> Fossil | |
cd git-repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class BitmapExt | |
{ | |
public static void ChangeColour(this Bitmap bmp, byte inColourR, byte inColourG, byte inColourB, byte outColourR, byte outColourG, byte outColourB) | |
{ | |
// Specify a pixel format. | |
PixelFormat pxf = PixelFormat.Format24bppRgb; | |
// Lock the bitmap's bits. | |
Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height); | |
BitmapData bmpData = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
YOUTUBEDL='/usr/local/bin/youtube-dl' # Absolute path to youtube-dl executable | |
ARCHIVE='~/youtube_archive' # Absolute path to archive | |
$YOUTUBEDL -U | |
archive () { | |
mkdir -p "$ARCHIVE/$1" | |
cd "$ARCHIVE/$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: Singletone<classtype>.Instance | |
public sealed class Singleton<T> where T : new() | |
{ | |
public static T Instance => Inner.InnerInstance; | |
private Singleton() { } | |
private class Inner | |
{ | |
internal static T InnerInstance = new T(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class CameraFollow : MonoBehaviour | |
{ | |
public Transform Target; | |
public float Damping = 1f; | |
public float LookAheadFactor = 3f; | |
public float LookAheadReturnSpeed = 0.5f; | |
public float LookAheadMoveTreshold = 0.1f; |
NewerOlder