This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Amazon EC2 user-data file for automatic configuration of IPsec/L2TP VPN | |
# on a Ubuntu server instance. Tested with 14.04 (Trusty) AND 12.04 (Precise). | |
# | |
# DO NOT RUN THIS SCRIPT ON YOUR PC OR MAC! THIS IS MEANT TO BE RUN WHEN | |
# YOUR AMAZON EC2 INSTANCE STARTS! | |
# | |
# Copyright (C) 2014 Lin Song | |
# Based on the work of Thomas Sarlandie (Copyright 2012) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime | |
import sublime_plugin | |
import re | |
class CompactExpandCssCommand(sublime_plugin.TextCommand): | |
def run(self, edit, action='compact'): | |
rule_starts = self.view.find_all('\{') | |
rule_ends = self.view.find_all('\}') |