Skip to content

Instantly share code, notes, and snippets.


Danil Skachkov xVir

  • Google
View GitHub Profile
xVir / sublime.textile
Last active Dec 15, 2015
Sublime Text 2 – Useful Shortcuts
View sublime.textile

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.


Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+ insert line after
xVir / GoogleImporter
Last active Dec 10, 2015
View GoogleImporter
List<Record> result = new ArrayList<Record>();
for (int i = 0; i < nodes.getLength(); i++) {
Node node = nodes.item(i);
if (node.getNodeType() == Node.ELEMENT_NODE) {
Element element = (Element) node;
Record record = new Record();
xVir / WaveHeaderWriter.cs
Created Dec 14, 2012
WAV file header writer
View WaveHeaderWriter.cs
public class WaveHeaderWriter
static byte[] RIFF_HEADER = new byte[] { 0x52, 0x49, 0x46, 0x46 };
static byte[] FORMAT_WAVE = new byte[] { 0x57, 0x41, 0x56, 0x45 };
static byte[] FORMAT_TAG = new byte[] { 0x66, 0x6d, 0x74, 0x20 };
static byte[] AUDIO_FORMAT = new byte[] { 0x01, 0x00 };
static byte[] SUBCHUNK_ID = new byte[] { 0x64, 0x61, 0x74, 0x61 };
private const int BYTES_PER_SAMPLE = 2;
public static void WriteHeader(