Skip to content

Instantly share code, notes, and snippets.

russgray / MC Cheat Sheet
Created April 5, 2019 15:46 — forked from urnenfeld/MC Cheat Sheet
Midnight Commander Cheat Sheet
View MC Cheat Sheet
Shortcut Description
C-o Drop to the console
Insert Select/deselect file
* Invert selection on files
+ Specify file selection options (including custom pattern)
- The same as above, but for deselecting
F5/F6 Copy/move selected files
"""Subscript extension for Markdown.
To subscript something, place a tilde symbol, '~', before and after the
text that you would like in subscript: C~6~H~12~O~6~
The numbers in this example will be subscripted. See below for more:
>>> import markdown
>>> md = markdown.Markdown(extensions=['subscript'])
russgray /
Last active September 8, 2015 17:04 — forked from dweymouth/
A Java class to perform password-based AES encryption and decryption
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer in return. D. Weymouth 4/2014
* ----------------------------------------------------------------------------
russgray / sms_trace
Last active September 1, 2015 08:40 — forked from henrikw/sms_trace
An example of a session-based log (the sending of an SMS)
View sms_trace
Type: Trace
Time stamp: 2014-01-20 09:23:01.910 CET
Trace key: 46702000029
Source: pf-Cluster=tsmr,pf-Host=tsmr1,pf-Node=tsmr1,map-Layer=map@tsmr1
-- 0, platform: Context info: StructuredDialogue
Origination address : {SccpUserAddress: RoutingIndicator=ROUTE_ON_GT, SignallingPointCode=null, SubsystemNumber=8, GlobalTitle={GlobalTitle: GtIndicator=INDICATOR_0100, TranslationType=0, {QualifiedDigits: NumberPlan=MSISDN, NumberType=INTERNATIONAL, Digits=461000301}}}
Destination address : {SccpUserAddress: RoutingIndicator=ROUTE_ON_GT, SignallingPointCode=null, SubsystemNumber=8, GlobalTitle={GlobalTitle: GtIndicator=INDICATOR_0100, TranslationType=0, {QualifiedDigits: NumberPlan=MSISDN, NumberType=INTERNATIONAL, Digits=461000101}}}
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.Appender;
import ch.qos.logback.core.Layout;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.tapstream.rollbar.RollbarAppender;
import io.dropwizard.logging.AbstractAppenderFactory;
import javax.validation.constraints.NotNull;
russgray / TweakedCoverage.xml
Created October 1, 2014 14:36
Reporting on NCover Exclusions
View TweakedCoverage.xml
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href='CoverageReport.xsl' type='text/xsl'?>
<!-- Generated by NCoverExplorer url= -->
<coverageReport reportTitle="Module Class Summary" date="Fri 15-Jun-2007" time="10:49:14" version="">
<project name="Atmosphere Processor::LV426" files="31" classes="34" members="541" nonCommentLines="4450" sequencePoints="4460" unvisitedPoints="1321" unvisitedFunctions="152" coverage="70.3811646" acceptable="80" functionCoverage="71.9038849" acceptableFunction="80" filteredBy="None" sortedBy="Name">
<coverageFile>C:\Program Files\NAnt\0.85\bin\Coverage.xml</coverageFile>
russgray / marshal-variable-length-array.cs
Created September 29, 2014 16:20
Marshalling a variable-length array from unmanaged code in C#
View marshal-variable-length-array.cs
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
namespace DnsMarshallingTest
#region Data structures
internal enum DnsRecordType : ushort
View gist:99e8feaf3e471a04d2bc
var rawSites = {
'programming': [
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
russgray / gist:3d3cbdda7de79b4c7c1b
Created May 1, 2014 14:44
Example msbuild script
View gist:3d3cbdda7de79b4c7c1b
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="" DefaultTargets="Start">
<Import Project="lib\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
<!-- Variables -->
<!-- Release Folder -->
<!-- To change the output folder, use the following parameter: /p:BuildDir=C:\BuildTest-->