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
'use strict'; | |
var remote = require('remote'); | |
var BrowserWindow = remote.require('browser-window'); | |
var Twitter = require('twitter'); | |
var OAuth = require('oauth').OAuth; | |
var authUrl = "https://api.twitter.com/oauth/authenticate?oauth_token="; | |
var oauth = new OAuth( | |
'https://api.twitter.com/oauth/request_token', |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Electron</title> | |
</head> | |
<body> | |
<script> | |
var ipc = require('ipc'); | |
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
require "option_parser" | |
class CLI | |
@version = "1.0.0" | |
@command_name = "cli" | |
@options : Hash(Symbol, Bool | Nil | String) = { | |
:bool => false, | |
:string => nil | |
} of Symbol => Bool | Nil | String | |
@command : String? |
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
class Delegator(T) | |
def initialize(@object : T) | |
end | |
def self.delegate(object) | |
new(object) | |
end | |
forward_missing_to @object | |
end |
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
require "http/client" | |
class MultiPartFormData | |
property io : IO::Memory | |
property size : Int32 | |
def initialize(name, filename, file, boundary=nil) | |
@boundary = boundary || "boundary" | |
first = [boundary_line, content_disposition(name, filename), "", ""].join("\r\n") | |
last = ["", boundary_last, ""].join("\r\n") | |
@io = IO::Memory.new |