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, sublime_plugin | |
class InsertPropertyCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
beginningOfClass = self.view.find_all(r"<\?php(.*\n)*class(.*\n*)\{")[0].end() | |
constructorFirstLinePos = self.view.find_all(r"__construct(.*\n*).*\{")[0] | |
constructorPos = self.view.find_all(r"__construct(.*\n*){1,10}?\}")[0] | |
selectionWordPosition = self.view.word(self.view.sel()[0]) | |
constructorFirstLineStr = self.view.substr(constructorFirstLinePos) |
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, sublime_plugin | |
class InsertPropertyCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
beginningOfClass = self.view.find_all(r"<\?php(.*\n)*class(.*\n*)\{")[0].end() | |
constructorFirstLinePos = self.view.find_all(r"__construct(.*\n*).*\{")[0] | |
constructorPos = self.view.find_all(r"__construct(.*\n*){1,10}?\}")[0] | |
selectionWordPosition = self.view.word(self.view.sel()[0]) | |
constructorFirstLineStr = self.view.substr(constructorFirstLinePos) |
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/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
apt-get update | |
apt-get -y upgrade | |
apt-get --yes --force-yes install apache2 php5 libapache2-mod-php5 postgresql php5-pgsql php5-mcrypt curl openssh-server git |