Skip to content

Instantly share code, notes, and snippets.

@wonzbak
wonzbak / Mailer.php
Last active January 4, 2017 11:01
Mailer Symfony 2/3
<?php
class Mailer
{
/** @var \Swift_Mailer */
private $mailer;
/** @var \Swift_Transport_AbstractSmtpTransport */
private $transport;
var timer = function(name) {
var start = new Date();
return {
stop: function() {
var end = new Date();
var time = end.getTime() - start.getTime();
console.log('Timer:', name, 'finished in', time, 'ms');
}
}
};
@wonzbak
wonzbak / fuzzy_file_finder.py
Created July 9, 2015 14:24
Fuzzy file finder
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
"""Find a file in a list in a fuzzy way.
"""
from __future__ import division
import os
import sys
import time
import re
@wonzbak
wonzbak / scopes.txt
Last active August 29, 2015 14:24 — forked from iambibhas/scopes.txt
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
CoffeeScript: source.coffee