Skip to content

Instantly share code, notes, and snippets.

@Adoveo
Adoveo / DiscordChatExport.py
Created January 11, 2018 09:41 — forked from aveao/DiscordChatExport.py
Discord chat exporter
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)
@Adoveo
Adoveo / SwiftInST3.md
Created May 11, 2017 12:54 — forked from Star-Lord-XIII/SwiftInST3.md
Running Swift scripts from Sublime Text 3 in MacOSX10.11

##Adding Swift Build System

  • Open Sublime Text 3
  • Go To Preferences > Browse Packages...
  • Add a file named Swift.sublime-build inside Packages directory.
  • Copy the following script in Swift.sublime-build file.
{
 	"shell_cmd": "xcrun swift $file",
@Adoveo
Adoveo / osascript.rb
Created April 27, 2017 22:12 — forked from jpalumickas/osascript.rb
Osascript examples
# === 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")