Skip to content

Instantly share code, notes, and snippets.

@nomadalex
nomadalex / prettify.lua
Created September 9, 2011 17:10 — forked from stevedonovan/prettify.lua
Script to convert Markdown source with code blocks into syntax-highlighted HTML.
-- translate Markdown with code blocks into HTML
-- with syntax highlighting.
-- If article.md was the source, Lua was the language and we
-- wanted a preview:
-- lua prettify.lua article lua preview
-- Without the last argument it will just write out the HTML body.
-- Languages supported are 'lua', 'cpp', 'java' and 'go
-- Indented code blocks may begin with an explicit @lang name line;
-- if you do this then mark every code block explicitly
-- e.g
@nomadalex
nomadalex / gist:1319913
Created October 27, 2011 15:35
hiless - LESS Syntax Highlighter
(function () {
//
// hiless - LESS Syntax Highlighter
//
// Copyright (c) 2010 Alexis Sellier
//
// All elements which match this will be syntax highlighted.
var selector = 'code';
@nomadalex
nomadalex / 12306.user.js
Created January 5, 2012 13:39 — forked from quietlynn/12306.user.js
12306 Auto Query => A javascript snippet to help you book ticket
/*
12306 Auto Query => A javascript snippet to help you book tickets online.
Copyright (C) 2011 Jingqin Lynn
Includes jQuery
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes Sizzle.js
@nomadalex
nomadalex / gist:1569456
Created January 6, 2012 07:04
Rakefile for build, signing, release of Visual Studio project
MSBUILD = 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe'
MAKENSIS = '"C:\Program Files\NSIS\makensis"'
SIGNTOOL = '"C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\signtool.exe"'
CERTIFICATE = File.expand_path '../etc/sign.pfx'
task :default => :build
def sign files
files = [files] unless files.kind_of? Enumerable
sh "#{SIGNTOOL} sign /f #{CERTIFICATE} /p fakepassord123 /t http://timestamp.comodoca.com/authenticode #{files.join ' '}"
/*
12306 Auto Login => A javascript snippet to help you auto login 12306.com.
Copyright (C) 2011 Kevintop
Includes jQuery
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes 12306.user.js
@nomadalex
nomadalex / TrafficLightAttribute.cs
Created August 2, 2017 08:50 — forked from LotteMakesStuff/TrafficLightAttribute.cs
TrafficLight control/layout/property drawer: Adds a new editor control that draws lil Traffic Lights in the inspector. its really useful for visualizing state. For example, checkboxes can be hard to read at a glace, but a Red or Green status light is easy! Recommend you use the attached package, as it has all the icon image files.
// Non Editor code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public abstract class TrafficLightAttribute : PropertyAttribute
{
public bool DrawLabel = true;
public string CustomLabel;
public bool AlsoDrawDefault;