Skip to content

Instantly share code, notes, and snippets.

View itsbth's full-sized avatar

Bjørn Tore Håvie itsbth

View GitHub Profile
@itsbth
itsbth / gist.py
Created November 6, 2011 05:03
Uploaded by gist.py
from urllib import request
from subprocess import Popen, PIPE
from os import path
import json
import base64
CREATE_URL = 'https://api.github.com/gists'
from urllib import request
from subprocess import Popen, PIPE
from os import path
import json
import base64
CREATE_URL = 'https://api.github.com/gists'
@itsbth
itsbth / gist.py
Created November 6, 2011 20:37
Uploaded by gist.py
contentimport urllib.request
from subprocess import Popen, PIPE
from os import path
import json
import base64
CREATE_URL = 'https://gist.github.com/gists'
@itsbth
itsbth / gist2.py
Created November 6, 2011 20:39
Uploaded by gist.py
contentimport urllib2
from subprocess import Popen, PIPE
from os import path
import json
import base64
from io import open
CREATE_URL = u'https://gist.github.com/gists'
@itsbth
itsbth / gist2.py
Created November 6, 2011 20:40
Uploaded by gist.py
contentimport urllib2
from subprocess import Popen, PIPE
from os import path
import json
import base64
from io import open
CREATE_URL = u'https://gist.github.com/gists'
@itsbth
itsbth / gist2.py
Created November 6, 2011 20:50
Uploaded by gist.py
import urllib2
from subprocess import Popen, PIPE
from os import path
import json
import base64
from io import open
CREATE_URL = u'https://gist.github.com/gists'
@itsbth
itsbth / gist.py
Created November 6, 2011 20:50
Uploaded by gist.py
import urllib.request
from subprocess import Popen, PIPE
from os import path
import json
import base64
CREATE_URL = 'https://gist.github.com/gists'
@itsbth
itsbth / GistCommand.py
Created November 6, 2011 21:38
Uploaded by gist.py
import sublime
import sublime_plugin
from gist import create
class UploadToGistCommand(sublime_plugin.TextCommand):
def run(self, edit):
if len(self.view.file_name()) > 0:
try:
@itsbth
itsbth / gist.py
Created November 6, 2011 21:41
Uploaded by gist.py
import urllib2
from subprocess import Popen, PIPE
from os import path
import json
import base64
import httplib
CREATE_URL = u'https://gist.github.com/gists'
@itsbth
itsbth / README.md
Created November 6, 2011 22:39
Uploaded by gist.py

Upload To Gist

A simple Sublime Text 2 plugin to upload the current file to Github.

Usage

Run 'Upload To Github' from the command palette.

Setup