Skip to content

Instantly share code, notes, and snippets.

@jwwishart
jwwishart / emacs
Last active July 14, 2016 11:27
My .emacs file
;; list the packages you want
;; http://stackoverflow.com/a/10093312
;; WARNING: git-gutter could not be found for some reason... Have to
;; install it manually;
(setq package-list '(ggtags company cc-mode company-c-headers linum-relative
multiple-cursors cedet git-gutter zenburn-theme
rainbow-delimiters))
(require 'package)
<snippet>
<content><![CDATA[
describe("${1}", () => {
${2}
});
]]></content>
<tabTrigger>describe</tabTrigger>
<scope>source.ts</scope>
</snippet>
@jwwishart
jwwishart / StringExtensionMethods.cs
Last active August 7, 2019 15:04
IsNullOrWhiteSpace extension method for .Net 3.5
using System;
using System.Collections.Generic;
using System.Text;
namespace System
{
public static class StringExtensionMethods
{
public static bool IsNullOrWhiteSpace(this string theString) {
if (theString == null) return true;
using System;
namespace String_IsNullOrEmpty_Test
{
class Program
{
static void Main( string [] args ) {
string test1 = null;
string test2 = string.Empty;
string test3 = "";
namespace String_IsNullOrWhitespace_Test
{
using System;
class Program
{
static void Main( string [] args ) {
string test1 = null; // True
string test2 = String.Empty; // True