Skip to content

Instantly share code, notes, and snippets.

View Logrythmik's full-sized avatar
🌐
Global

Jason Wicker Logrythmik

🌐
Global
View GitHub Profile
@Logrythmik
Logrythmik / dabblet.css
Created December 21, 2020 21:48
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
kind: Experience
apiVersion: xapi.view.do/v1
metadata:
storyKey: "cdxa-survey"
data:
globalAudio:
- id: "audio1"
name: "Audio 2"
src: "https://storage.googleapis.com/ivx-static/goodsam/gs-esp-dm-purl/audio/survey-default.mp3"
- id: "audio2"
### Keybase proof
I hereby claim:
* I am logrythmik on github.
* I am jasonwicker (https://keybase.io/jasonwicker) on keybase.
* I have a public key whose fingerprint is 7FDC 2B01 D161 8583 07B8 A21E DAF9 AF5B 0E8A 0485
To claim this, I am signing this object:
@Logrythmik
Logrythmik / InputManager.asset
Created August 16, 2012 20:35 — forked from N-Carter/InputManager.asset
A sample text-mode InputManager.asset file
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!13 &1
InputManager:
m_ObjectHideFlags: 0
m_Axes:
- serializedVersion: 3
m_Name: Horizontal
descriptiveName:
descriptiveNegativeName:
@Logrythmik
Logrythmik / .NET SAMPLE
Created August 16, 2012 20:31
My Codez
.NET
@Logrythmik
Logrythmik / gist:3373368
Created August 16, 2012 20:25
Code snippet
public class NoAntiForgeryTokenAttribute : Attribute, IMetadataAware
{
public const string NO_ANTI_FORGERY_TOKEN = "NoAntiForgeryToken";
public void OnMetadataCreated(ModelMetadata metadata)
{
metadata.AdditionalValues[NO_ANTI_FORGERY_TOKEN] = true;
}
}
@Logrythmik
Logrythmik / Extensions.cs
Created July 19, 2012 22:26
Razor Script Block Templated Delegate
private const string SCRIPTBLOCK_BUILDER = "ScriptBlockBuilder";
public static MvcHtmlString ScriptBlock(this WebViewPage webPage,
Func<dynamic, HelperResult> template)
{
if (!webPage.IsAjax)
{
var scriptBuilder = webPage.Context.Items[SCRIPTBLOCK_BUILDER]
as StringBuilder ?? new StringBuilder();
@Logrythmik
Logrythmik / Extensions.cs
Created July 19, 2012 22:02
Human Friendly Filesize, from Double Extension Method
public static string GetFileSize(this double byteCount)
{
string size = "0 Bytes";
if (byteCount >= 1073741824.0)
size = String.Format("{0:##.##}", byteCount / 1073741824.0) + " GB";
else if (byteCount >= 1048576.0)
size = String.Format("{0:##.##}", byteCount / 1048576.0) + " MB";
else if (byteCount >= 1024.0)
size = String.Format("{0:##.##}", byteCount / 1024.0) + " KB";
else if (byteCount > 0 && byteCount < 1024.0)
@Logrythmik
Logrythmik / Extensions.cs
Created July 17, 2012 22:01
TemplifyWith Extension Method
public static string TemplifyWith<T>(this string templatedString, T obj, string tokenFormat = "[{0}]")
{
var result = templatedString;
var type = typeof(T);
foreach (var propertyInfo in type.GetProperties())
{
var token = string.Format(tokenFormat, propertyInfo.Name);