Skip to content

Instantly share code, notes, and snippets.

View pellejacobs's full-sized avatar

Pelle Jacobs pellejacobs

View GitHub Profile
"rulers":
[
100
],
<snippet>
<content><![CDATA[
<%${1:=} ${2:ruby code} %>
]]></content>
<tabTrigger>&lt;%</tabTrigger>
<description>Ruby code in erb</description>
<scope>text.html</scope>
</snippet>
@pellejacobs
pellejacobs / do_end.sublime-snippet
Created October 3, 2015 23:28
general do … end for ruby
<snippet>
<content><![CDATA[
do
${1:code}
end
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>do</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.ruby</scope>
@pellejacobs
pellejacobs / binding.pry.sublime-snippet
Created October 3, 2015 23:29
binding.pry for pry debugging
<snippet>
<content><![CDATA[
binding.pry
]]></content>
<tabTrigger>binding</tabTrigger>
<description>binding.pry</description>
<scope>source.ruby</scope>
</snippet>
@pellejacobs
pellejacobs / bundle.d.ts
Created August 26, 2016 08:23
Typings bundling example
// Generated by typings
// Source: submodule.d.ts
declare module '~my-main-module/submodule' {
export interface submoduleInterface {
someProp: number
}
}
declare module 'my-main-module/submodule' {
export * from '~my-main-module/submodule';
}
import { Session } from 'express'
let theSession: Session
theSession.user.login

Bash commands:

typings init
typings install -S bluebird
npm install -S bluebird
tsc 
node app.js
@pellejacobs
pellejacobs / COMMANDS.md
Last active August 31, 2016 11:59
Stackoverflow example

Bash commands:

typings init
typings install -S bluebird
npm install -S bluebird
tsc 
browserify app.js -o bundle.js
export const FIRST = 1
export const SECOND = 2