##Adding Swift Build System
- Open Sublime Text 3
- Go To
Preferences > Browse Packages... - Add a file named
Swift.sublime-buildinsidePackagesdirectory. - Copy the following script in
Swift.sublime-buildfile.
{
"shell_cmd": "xcrun swift $file",
| import logging | |
| import discord | |
| import asyncio | |
| import datetime | |
| logging.basicConfig(level=logging.INFO) | |
| client = discord.Client() | |
| # You need discord.py rewrite. | |
| # pip3 install -U git+https://github.com/Rapptz/discord.py@rewrite |
| @echo off | |
| :: https://gist.github.com/Albirew/613cbf63595647ff26b269d5271871a0 | |
| :: added rev.18 of Matt's privilege escalation script: http://stackoverflow.com/posts/12264592/revisions | |
| :: UAC privilege escalation | |
| :checkPrivileges | |
| NET FILE 1>NUL 2>NUL | |
| if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges ) | |
| :getPrivileges | |
| if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges) |
##Adding Swift Build System
Preferences > Browse Packages...Swift.sublime-build inside Packages directory.Swift.sublime-build file.{
"shell_cmd": "xcrun swift $file",
| # === Terminal.app === # | |
| # Open new tab in terminal. | |
| exec("osascript -e 'tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down' > /dev/null 2>&1 ") | |
| # Open directory | |
| exec("osascript -e 'tell application \"Terminal\" to do script \"cd directory\" in selected tab of the front window' > /dev/null 2>&1 ") | |
| # Open directory in new tab (this is better) | |
| exec("osascript -e 'tell application \"Terminal\"' -e 'tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down' -e 'do script with command \"cd directory && clear\" in selected tab of the front window' -e 'end tell' > /dev/null 2>&1") |