A syntax definition for Sublime Text.
Not intened for a programming language but for prose writing. This enables :
- highlighting for dialogs in a novel
- Sections and titles highlights
- Notes highlights
""" | |
Created on Fri Jan 27 21:48:58 2012 | |
@author: jay | |
""" | |
import json | |
import os | |
import gdbm | |
import time |
public class Base62 { | |
public static final String ALPHABET = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; | |
public static final int BASE = ALPHABET.length(); | |
private Base62() {} | |
public static String fromBase10(int i) { | |
StringBuilder sb = new StringBuilder(""); |
// Credit to damien_oconnell from http://forum.unity3d.com/threads/39513-Click-drag-camera-movement | |
// for using the mouse displacement for calculating the amount of camera movement and panning code. | |
using UnityEngine; | |
using System.Collections; | |
public class MoveCamera : MonoBehaviour | |
{ | |
// | |
// VARIABLES |
private void drawTable(PDPage page, PDPageContentStream contentStream, float y, float margin, String[][] content, float[] colWidths) throws IOException { | |
final int rows = content.length; | |
final int cols = content[0].length; | |
final float rowHeight = 40f; | |
final float tableWidth = page.findMediaBox().getWidth() - margin - margin; | |
final float tableHeight = rowHeight * rows; | |
final float colWidth = tableWidth/(float)cols; | |
final float cellMargin=5f; |
#!/usr/bin/python | |
import sys | |
import os, shutil | |
import subprocess | |
import os.path | |
from datetime import datetime | |
######################## Functions ######################### |
// Credit to damien_oconnell from http://forum.unity3d.com/threads/39513-Click-drag-camera-movement | |
// for using the mouse displacement for calculating the amount of camera movement and panning code. | |
using UnityEngine; | |
using System.Collections; | |
public class MoveCamera : MonoBehaviour | |
{ | |
// |
A syntax definition for Sublime Text.
Not intened for a programming language but for prose writing. This enables :
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
using UnityEngine; | |
using UnityEngine.EventSystems; | |
namespace UnityEngine.EventSystems | |
{ | |
public class MultiTouchInputModule : PointerInputModule | |
{ | |
private PinchEventData _pinchData; | |
private RotateEventData _rotateData; | |
Add-Type -AssemblyName System.Windows.Forms | |
while ($true) | |
{ | |
$Pos = [System.Windows.Forms.Cursor]::Position | |
$x = ($pos.X % 500) + 1 | |
$y = ($pos.Y % 500) + 1 | |
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y) | |
Start-Sleep -Seconds 10 | |
} |