Skip to content

Instantly share code, notes, and snippets.

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

Johnny iUltimateLP

🏠
Working from home
View GitHub Profile
aTexture = new Texture2D(1,1);
aTexture.LoadImage(File.ReadAllBytes(Util.GetModWorkingDir(false, 0) + "/Resources/original/grass.png"));
aTexture.anisoLevel = 8;
bTexture = new Texture2D(1, 1);
bTexture.LoadImage(File.ReadAllBytes(Util.GetModWorkingDir(false, 0) + "/Resources/snow1.png"));
bTexture.anisoLevel = 8;
terMan = FindObjectOfType<TerrainManager>();
-- Mini game controller for The Talos Principle
-- by iUltimateLP
-- Colors we play with
local colors = {"Red", "Purple", "Yellow",
"Orange", "Lime", "Cyan",
"Gray", "Blue", "Pink",
"Black"}
-- Tries we have, 0 if instant death
local tries = 0
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "CompressedSaverPrivatePCH.h"
#include "CompressedSaverBPLibrary.h"
UCompressedSaverBPLibrary::UCompressedSaverBPLibrary(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
}
@iUltimateLP
iUltimateLP / sinusbot_itunescoverart.js
Last active August 12, 2016 10:48
A simple script to get Album Artwork from iTunes and put it inside the TeamSpeak avatar (using Sinusbot).
registerPlugin
(
{
name: 'iTunes Cover Art',
version: '1.0',
description: 'Download Cover Art from the iTunes API!',
author: 'Johnny Verbeek (iUltimateLP) <iredcraft@gmail.com>',
vars: {
desired_album_size:
{
function hsvToRgb(h, s, v, a)
local r, g, b
local i = math.floor(h * 6);
local f = h * 6 - i;
local p = v * (1 - s);
local q = v * (1 - f * s);
local t = v * (1 - (1 - f) * s);
i = i % 6
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", "localhost:8080/secure", true);
xmlhttp.setRequestHeader("Authorization", "Basic logout");
xmlhttp.send();
@iUltimateLP
iUltimateLP / analog-clock.cc
Last active May 16, 2018 16:24
RGB LED Matrix + Raspberry Pi = Analog Clock
// -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
// Small example how to use the library.
// For more examples, look at demo-main.cc
//
// This code is public domain
// (but note, that the led-matrix library this depends on is GPL v2)
#include "led-matrix.h"
#include <unistd.h>
@iUltimateLP
iUltimateLP / steamsdk_lambda_callresults.h
Last active December 19, 2020 19:10
This adds a prototype for a custom CCallResult class which allows you to use lambdas instead of class member functions.
// This is a custom Steam CallResult to support C++ lambdas
//-----------------------------------------------------------------------------
// Purpose: maps a steam async call result to a lambda function
// template params: P = parameter struct
//-----------------------------------------------------------------------------
template<class P>
class CLambdaCallResult : private CCallbackBase
{
public:
typedef void (*func_t)(P*, bool);
@iUltimateLP
iUltimateLP / gource_p4.sh
Created October 7, 2021 17:09
Gource Perforce Script
#!/bin/bash
# Put your P4 credentials here!
P4_IP="some.domain.com:1666"
P4_USER=John
P4_PASS=johndoe1234
rm -rf gource.log
p4 -p $P4_IP -u $P4_USER -P $P4_PASS changes |awk '{print $2}'|p4 -p $P4_IP -u $P4_USER -P $P4_PASS -x - describe -s|awk '(/^Change / || /^... /) {if ($1 == "Change") {u=substr($4,1,index($4,"@")-1); t = $(NF-1) " " $NF; gsub("/"," ",t); gsub(":"," ",t);time=mktime(t);} else {if ($NF=="add") {c="A";} else if ($NF=="delete") {c="D";} else {c="M";};f=substr($2,3,index($2,"#")-3);print time "|" u "|" c "|" f;}}'|sort -n > gource.log
@iUltimateLP
iUltimateLP / vax_colors_for_resharper.DotSettings
Last active May 9, 2022 08:32
Visual Assist X color scheme for ReSharper. Import the .DotSettings file into ReSharper and the .vssettings file into Visual Studio.
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeInspection/Highlighting/IdentifierHighlightingEnabled/@EntryValue">True</s:Boolean></wpf:ResourceDictionary>