text stringlengths 9 39.2M | dir stringlengths 25 226 | lang stringclasses 163
values | created_date timestamp[s] | updated_date timestamp[s] | repo_name stringclasses 751
values | repo_full_name stringclasses 752
values | star int64 1.01k 183k | len_tokens int64 1 18.5M |
|---|---|---|---|---|---|---|---|---|
```swift
import Foundation
import CommonCrypto
open class CCCrypto: StreamCryptoProtocol {
public enum Algorithm {
case aes, cast, rc4
public func toCCAlgorithm() -> CCAlgorithm {
switch self {
case .aes:
return CCAlgorithm(kCCAlgorithmAES)
case ... | /content/code_sandbox/src/Crypto/CCCrypto.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 452 |
```swift
import Foundation
import CommonCrypto
public enum CryptoOperation {
case encrypt, decrypt
public func toCCOperation() -> CCOperation {
switch self {
case .encrypt:
return CCOperation(kCCEncrypt)
case .decrypt:
return CCOperation(kCCDecrypt)
}
... | /content/code_sandbox/src/Crypto/CryptoEnum.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 429 |
```swift
import Foundation
import CommonCrypto
public struct MD5Hash {
public static func final(_ value: String) -> Data {
let data = value.data(using: String.Encoding.utf8)!
return final(data)
}
public static func final(_ value: Data) -> Data {
var result = Data(count: Int(CC_MD5_... | /content/code_sandbox/src/Crypto/MD5Hash.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 131 |
```swift
import Foundation
import Sodium
open class SodiumStreamCrypto: StreamCryptoProtocol {
public enum Alogrithm {
case chacha20, salsa20
}
public let key: Data
public let iv: Data
public let algorithm: Alogrithm
var counter = 0
let blockSize = 64
public init(key: Data, ... | /content/code_sandbox/src/Crypto/SodiumStreamCrypto.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 512 |
```swift
import Foundation
import Sodium
open class Libsodium {
/// This must be accessed at least once before Libsodium is used.
public static let initialized: Bool = {
// this is loaded lasily and also thread-safe
_ = sodium_init()
return true
}()
}
``` | /content/code_sandbox/src/Crypto/Libsodium.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 63 |
```swift
import Foundation
public struct CryptoHelper {
public static let infoDictionary: [CryptoAlgorithm:(Int, Int)] = [
.AES128CFB: (16, 16),
.AES192CFB: (24, 16),
.AES256CFB: (32, 16),
.CHACHA20: (32, 8),
.SALSA20: (32, 8),
.RC4MD5: (16, 16)
]
public... | /content/code_sandbox/src/Crypto/CryptoHelper.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 473 |
```swift
import Foundation
/// The HTTP proxy server.
public final class GCDHTTPProxyServer: GCDProxyServer {
/**
Create an instance of HTTP proxy server.
- parameter address: The address of proxy server.
- parameter port: The port of proxy server.
*/
override public init(address: IPAdd... | /content/code_sandbox/src/ProxyServer/GCDHTTPProxyServer.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 153 |
```swift
import Foundation
/// The SOCKS5 proxy server.
public final class GCDSOCKS5ProxyServer: GCDProxyServer {
/**
Create an instance of SOCKS5 proxy server.
- parameter address: The address of proxy server.
- parameter port: The port of proxy server.
*/
override public init(address:... | /content/code_sandbox/src/ProxyServer/GCDSOCKS5ProxyServer.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 163 |
```swift
import Foundation
import CocoaAsyncSocket
/// Proxy server which listens on some port by GCDAsyncSocket.
///
/// This shoule be the base class for any concrete implementation of proxy server (e.g., HTTP or SOCKS5) which needs to listen on some port.
open class GCDProxyServer: ProxyServer, GCDAsyncSocketDelega... | /content/code_sandbox/src/ProxyServer/GCDProxyServer.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 495 |
```swift
import Foundation
open class Observer<T: EventType> {
public init() {}
open func signal(_ event: T) {}
}
``` | /content/code_sandbox/src/Event/Observer.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 28 |
```swift
import Foundation
open class ObserverFactory {
public static var currentFactory: ObserverFactory?
public init() {}
open func getObserverForTunnel(_ tunnel: Tunnel) -> Observer<TunnelEvent>? {
return nil
}
open func getObserverForAdapterSocket(_ socket: AdapterSocket) -> Observer... | /content/code_sandbox/src/Event/ObserverFactory.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 163 |
```swift
import Foundation
import CocoaAsyncSocket
import Resolver
/**
The base proxy server class.
This proxy does not listen on any port.
*/
open class ProxyServer: NSObject, TunnelDelegate {
typealias TunnelArray = [Tunnel]
/// The port of proxy server.
public let port: Port
/// The address o... | /content/code_sandbox/src/ProxyServer/ProxyServer.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 633 |
```swift
import Foundation
public protocol EventType: CustomStringConvertible {}
``` | /content/code_sandbox/src/Event/Event/EventType.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 12 |
```swift
import Foundation
public enum ProxyServerEvent: EventType {
public var description: String {
switch self {
case let .newSocketAccepted(socket, onServer: server):
return "Proxy server \(server) just accepted a new socket \(socket)."
case let .tunnelClosed(tunnel, onServe... | /content/code_sandbox/src/Event/Event/ProxyServerEvent.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 162 |
```swift
import Foundation
import CocoaLumberjackSwift
open class DebugObserverFactory: ObserverFactory {
public override init() {}
override open func getObserverForTunnel(_ tunnel: Tunnel) -> Observer<TunnelEvent>? {
return DebugTunnelObserver()
}
override open func getObserverForProxyServer... | /content/code_sandbox/src/Event/DebugObserver.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 699 |
```swift
import Foundation
public enum TunnelEvent: EventType {
public var description: String {
switch self {
case .opened(let tunnel):
return "Tunnel \(tunnel) starts processing data."
case .closeCalled(let tunnel):
return "Close is called on tunnel \(tunnel)."
... | /content/code_sandbox/src/Event/Event/TunnelEvent.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 667 |
```swift
import Foundation
public enum ProxySocketEvent: EventType {
public var description: String {
switch self {
case .socketOpened(let socket):
return "Start processing data from proxy socket \(socket)."
case .disconnectCalled(let socket):
return "Disconnect is j... | /content/code_sandbox/src/Event/Event/ProxySocketEvent.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 400 |
```swift
import Foundation
public enum RuleMatchEvent: EventType {
public var description: String {
switch self {
case let .ruleMatched(session, rule: rule):
return "Rule \(rule) matched session \(session)."
case let .ruleDidNotMatch(session, rule: rule):
return "Rul... | /content/code_sandbox/src/Event/Event/RuleMatchEvent.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 183 |
```swift
import Foundation
/// The rule matches all DNS and connect sessions.
open class AllRule: Rule {
fileprivate let adapterFactory: AdapterFactory
open override var description: String {
return "<AllRule>"
}
/**
Create a new `AllRule` instance.
- parameter adapterFactory: The ... | /content/code_sandbox/src/Rule/AllRule.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 270 |
```swift
import Foundation
public enum AdapterSocketEvent: EventType {
public var description: String {
switch self {
case let .socketOpened(socket, withSession: session):
return "Adatper socket \(socket) starts to connect to remote with session \(session)."
case .disconnectCall... | /content/code_sandbox/src/Event/Event/AdapterSocketEvent.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 358 |
```swift
import Foundation
/// The rule matches the request which failed to look up.
open class DNSFailRule: Rule {
fileprivate let adapterFactory: AdapterFactory
open override var description: String {
return "<DNSFailRule>"
}
/**
Create a new `DNSFailRule` instance.
- parameter a... | /content/code_sandbox/src/Rule/DNSFailRule.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 327 |
```swift
import Foundation
/// The rule matches every request and returns direct adapter.
///
/// This is equivalent to create an `AllRule` with a `DirectAdapterFactory`.
open class DirectRule: AllRule {
open override var description: String {
return "<DirectRule>"
}
/**
Create a new `DirectRu... | /content/code_sandbox/src/Rule/DirectRule.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 88 |
```swift
import Foundation
/// The class managing rules.
open class RuleManager {
/// The current used `RuleManager`, there is only one manager should be used at a time.
///
/// - note: This should be set before any DNS or connect sessions.
public static var currentManager: RuleManager = RuleManager(fr... | /content/code_sandbox/src/Rule/RuleManager.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 564 |
```swift
import Foundation
import CocoaLumberjackSwift
/// The rule matches the session based on the geographical location of the corresponding IP address.
open class CountryRule: Rule {
fileprivate let adapterFactory: AdapterFactory
/// The ISO code of the country.
public let countryCode: String
///... | /content/code_sandbox/src/Rule/CountryRule.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 435 |
```swift
import Foundation
/// The rule matches the host domain to a list of predefined criteria.
open class DomainListRule: Rule {
public enum MatchCriterion {
case regex(NSRegularExpression), prefix(String), suffix(String), keyword(String), complete(String)
func match(_ domain: String) -> Bool {... | /content/code_sandbox/src/Rule/DomainListRule.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 526 |
```swift
import Foundation
/**
The information available in current round of matching.
Since we want to speed things up, we first match the request without resolving it (`.Domain`). If any rule returns `.Unknown`, we lookup the request and rematches that rule (`.IP`).
- Domain: Only domain information is availabl... | /content/code_sandbox/src/Rule/DNSSessionMatchType.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 90 |
```swift
import Foundation
/**
The result of matching the rule to DNS request.
- Real: The request matches the rule and the connection can be done with a real IP address.
- Fake: The request matches the rule but we need to identify this session when a later connection is fired with an IP address instead of t... | /content/code_sandbox/src/Rule/DNSSessionMatchResult.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 123 |
```swift
import Foundation
/// The rule matches the ip of the target hsot to a list of IP ranges.
open class IPRangeListRule: Rule {
fileprivate let adapterFactory: AdapterFactory
open override var description: String {
return "<IPRangeList>"
}
/// The list of regular expressions to match to.... | /content/code_sandbox/src/Rule/IPRangeListRule.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 480 |
```swift
import Foundation
/// The rule defines what to do for DNS requests and connect sessions.
open class Rule: CustomStringConvertible {
open var description: String {
return "<Rule>"
}
/**
Create a new rule.
*/
public init() {
}
/**
Match DNS request to this rule.
... | /content/code_sandbox/src/Rule/Rule.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 198 |
```swift
import Foundation
/// Representing all the information in one connect session.
public final class ConnectSession {
public enum EventSourceEnum {
case proxy, adapter, tunnel
}
/// The requested host.
///
/// This is the host received in the request. May be a domain, a real IP o... | /content/code_sandbox/src/Messages/ConnectSession.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 1,001 |
```swift
import Foundation
open class HTTPHeader {
public enum HTTPHeaderError: Error {
case malformedHeader, invalidRequestLine, invalidHeaderField, invalidConnectURL, invalidConnectPort, invalidURL, missingHostField, invalidHostField, invalidHostPort, invalidContentLength, illegalEncoding
}
... | /content/code_sandbox/src/Messages/HTTPHeader.swift | swift | 2016-05-07T13:03:07 | 2024-07-25T11:16:48 | NEKit | zhuhaow/NEKit | 2,835 | 1,385 |
```unknown
github "CocoaLumberjack/CocoaLumberjack" "3.2.0"
github "ReactiveCocoa/ReactiveCocoa" "5.0.4"
github "ReactiveCocoa/ReactiveSwift" "1.1.3"
github "antitypical/Result" "3.2.3"
github "behrang/YamlSwift" "3.4.0"
github "lexrus/MMDB-Swift" "0.2.6"
github "robbiehanson/CocoaAsyncSocket" "7.6.1"
github "sparkle-p... | /content/code_sandbox/Cartfile.resolved | unknown | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 212 |
```unknown
github "zhuhaow/NEKit" "0.12.1"
github "sparkle-project/Sparkle" "1.14.0"
github "ReactiveCocoa/ReactiveCocoa" "5.0.4"
``` | /content/code_sandbox/Cartfile | unknown | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 53 |
```yaml
machine:
xcode:
version: "8.1"
dependencies:
pre:
- echo "2.3.1" > .ruby-version
override:
- bin/bootstrap-if-needed
cache_directories:
- "Carthage"
test:
override:
- set -o pipefail && xcodebuild -project SpechtLite.xcodeproj -scheme "SpechtLite" build CODE_SIGN_IDENTITY="" CODE_S... | /content/code_sandbox/circle.yml | yaml | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 131 |
```swift
import Foundation
import SystemConfiguration
let version = "0.4.0"
func main(_ args: [String]) {
var port: Int = 0
var flag: Bool = false
if args.count > 2 {
guard let _port = Int(args[1]) else {
print("ERROR: port is invalid.")
exit(EXIT_FAILURE)
}
... | /content/code_sandbox/ProxyConfig/ProxyConfig/main.swift | swift | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 855 |
```unknown
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
36B6A3271E263590002B5B1D /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36B6A3261E263590002B5B1D /* main.swift */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFiles... | /content/code_sandbox/ProxyConfig/ProxyConfig.xcodeproj/project.pbxproj | unknown | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 2,636 |
```unknown
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:ProxyConfig.xcodeproj">
</FileRef>
</Workspace>
``` | /content/code_sandbox/ProxyConfig/ProxyConfig.xcodeproj/project.xcworkspace/contents.xcworkspacedata | unknown | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 51 |
```unknown
-----BEGIN PUBLIC KEY-----
your_sha256_hash
/2Fda5vNquE6tFDy29OpzDbKXyYGnAspWdbRsWok2+MA0xh5f7Tieep/E7r4CGlW
VgBhSPh/xHD2bLWhiZo1NGW3391yX7ggMkfq+aoddNzN3pbibLvhFZbEKvoQyHg/
XGvu+r43VYrRAhUAgpmW8YWQIVLkOcYQ8OfvD31SXQkCgYB8+NTU5OxawoE12QQH
wc89JWAgM/uiaxVLXNRcq+mxmpQfjWB0jDGluZqAWailuy7c6uA2ExzReHbpqebg
albi8... | /content/code_sandbox/cert/dsa_pub.pem | unknown | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 409 |
```unknown
{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf600
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset134 PingFangSC-Regular;}
{\colortbl;\red255\green255\blue255;\red48\green36\blue37;}
{\*\expandedcolortbl;\csgray\c100000;\csgenericrgb\c18824\c14118\c14510;}
\paperw11900\paperh16840\margl1440\margr1... | /content/code_sandbox/Credits.rtf | unknown | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 4,510 |
```unknown
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning ... | /content/code_sandbox/SpechtLite.xcodeproj/xcshareddata/xcschemes/SpechtLiteLaunchHelper.xcscheme | unknown | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 792 |
```unknown
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning ... | /content/code_sandbox/SpechtLite.xcodeproj/xcshareddata/xcschemes/SpechtLite.xcscheme | unknown | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 905 |
```unknown
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning ... | /content/code_sandbox/SpechtLite.xcodeproj/xcshareddata/xcschemes/ProxyConfig.xcscheme | unknown | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 772 |
```unknown
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:SpechtLite.xcodeproj">
</FileRef>
</Workspace>
``` | /content/code_sandbox/SpechtLite.xcodeproj/project.xcworkspace/contents.xcworkspacedata | unknown | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 52 |
```unknown
#!/usr/bin/env sh
set -e
echo $P12_CERT | base64 -D > cert/cert.p12
sudo security unlock-keychain -p circle circle.keychain
sudo security import cert/cert.p12 -k circle.keychain -P "" -T /usr/bin/codesign
[ -f $(git rev-parse --git-dir)/shallow ] && git fetch --unshallow
gem install gym github-markup redc... | /content/code_sandbox/bin/release_app | unknown | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 268 |
```unknown
#!/bin/bash
set -e
set -o pipefail
for file in "dsaparam.pem" "dsa_priv.pem" "dsa_pub.pem"; do
if [ -e "$file" ]; then
echo "There's already a $file here! Move it aside or be more careful!"
exit 1
fi
done
openssl="/usr/local/opt/openssl/bin/openssl"
$openssl gendsa <($openssl dsaparam 1024) -ou... | /content/code_sandbox/bin/generate_keys | unknown | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 206 |
```unknown
#!/bin/sh
set -eo pipefail
carthage bootstrap --no-use-binaries --platform mac
cp Cartfile.resolved Carthage
``` | /content/code_sandbox/bin/bootstrap | unknown | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 33 |
```unknown
#!/bin/sh
set -eo pipefail
if ! cmp -s Cartfile.resolved Carthage/Cartfile.resolved; then
bin/bootstrap
fi
``` | /content/code_sandbox/bin/bootstrap-if-needed | unknown | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 37 |
```unknown
#!/usr/bin/env sh
set -e
set -o pipefail
if [ -z "$TRAVIS_TAG" ]
then
echo "Not able to build on non-tag commit"
else
echo "Generating appcast file..."
if [[ "$TRAVIS_TAG" =~ ^([0-9]+\.?)+(\.|-)[a-z]+[0-9]*$ ]]
then
ruby -rerb -rdate -e "puts ERB.new(File.read(\"appcast/devappcast.xml.erb\"), nil, '-').r... | /content/code_sandbox/bin/publish_appcast | unknown | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 406 |
```ruby
require 'github/markup'
puts GitHub::Markup.render('Changelog.md')
``` | /content/code_sandbox/bin/compile_changelog.rb | ruby | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 17 |
```unknown
#!/bin/sh
set -e
set -o pipefail
if [ "$#" -ne 2 ]; then
echo "Usage: $0 update_archive private_key"
exit 1
fi
openssl=$(sh /etc/profile; which openssl)
$openssl dgst -sha1 -binary < "$1" | $openssl dgst -dss1 -sign "$2" | tee signature | $openssl enc -base64
``` | /content/code_sandbox/bin/sign_update | unknown | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 93 |
```html+erb
<%- git = `sh /etc/profile; which git`.strip -%>
<%- version = `#{git} describe --tags --always --abbrev=0`.strip -%>
<%- build_number = `#{git} rev-list HEAD --count`.strip -%>
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:sparkle="path_to_url" xmlns:dc="path_to_url">
<channel>
<title>Sp... | /content/code_sandbox/appcast/devappcast.xml.erb | html+erb | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 280 |
```html+erb
<%- git = `sh /etc/profile; which git`.strip -%>
<%- version = `#{git} describe --tags --always --abbrev=0`.strip -%>
<%- build_number = `#{git} rev-list HEAD --count`.strip -%>
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:sparkle="path_to_url" xmlns:dc="path_to_url">
<channel>
<title>Sp... | /content/code_sandbox/appcast/stableappcast.xml.erb | html+erb | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 280 |
```unknown
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:SpechtLite.xcodeproj">
</FileRef>
</Workspace>
``` | /content/code_sandbox/SpechtLite.xcworkspace/contents.xcworkspacedata | unknown | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 52 |
```swift
import Cocoa
class Utils {
static func alertError(_ errorDescription: String) {
DispatchQueue.main.async {
let alert = NSAlert()
alert.messageText = errorDescription
alert.runModal()
}
}
}
``` | /content/code_sandbox/SpechtLite/Utils.swift | swift | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 49 |
```swift
import Foundation
open class ProxyHelper {
static let kProxyConfigPath = "/Library/Application Support/SpechtLite/ProxyConfig"
static let kVersion = "0.4.0"
open static func checkVersion() -> Bool {
let task = Process()
task.launchPath = kProxyConfigPath
task.arguments = ... | /content/code_sandbox/SpechtLite/ProxyHelper.swift | swift | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 398 |
```swift
import Cocoa
import NEKit
import CocoaLumberjackSwift
class SPObserverFactory: ObserverFactory {
override func getObserverForAdapterSocket(_ socket: AdapterSocket) -> Observer<AdapterSocketEvent>? {
return SPAdapterSocketObserver()
}
class SPAdapterSocketObserver: Observer<AdapterSocketE... | /content/code_sandbox/SpechtLite/SPObserverFactory.swift | swift | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 143 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "path_to_url">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIconFile</key>
<string></string>
<... | /content/code_sandbox/SpechtLite/Info.plist | xml | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 380 |
```swift
import Cocoa
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
var menuController: MenuBarController!
func applicationDidFinishLaunching(_ aNotification: Notification) {
LoggerManager.setUp()
PreferenceManager.setUp()
UpdateManager.setUp... | /content/code_sandbox/SpechtLite/AppDelegate.swift | swift | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 111 |
```swift
import Foundation
class Opt {
static let configurationFolder = ".SpechtLite"
static let defaultProxyPort = 9090
}
``` | /content/code_sandbox/SpechtLite/Opt.swift | swift | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 31 |
```xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
... | /content/code_sandbox/SpechtLite/Base.lproj/MainMenu.xib | xml | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 282 |
```swift
import Foundation
import ReactiveSwift
class ProxySettingManager {
static let setAsSystemProxy: MutableProperty<Bool> = MutableProperty(false)
static func setUp() {
setAsSystemProxy.producer.combineLatest(with: ProfileManager.currentProxyPort.producer).skip(while: { enabled, _ in !enabled }).... | /content/code_sandbox/SpechtLite/Manager/ProxySettingManager.swift | swift | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 230 |
```swift
import Foundation
import ServiceManagement
import ReactiveSwift
class AutostartManager {
static let identifier = "me.zhuhaow.osx.SpechtLite.LaunchHelper"
static let autostartAtLogin: MutableProperty<Bool> = MutableProperty(false)
static func setUp() {
autostartAtLogin.producer.st... | /content/code_sandbox/SpechtLite/Manager/AutostartManager.swift | swift | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 154 |
```swift
import Foundation
import ReactiveSwift
class PreferenceManager {
static let defaultProfileKey = "defaultConfiguration"
static let allowFromLanKey = "allowFromLan"
static let setAsSystemProxyKey = "setUpSystemProxy"
static let useDevChannelKey = "useDevChannel"
static let autostartKey = "au... | /content/code_sandbox/SpechtLite/Manager/PreferenceManager.swift | swift | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 354 |
```swift
import Foundation
import Sparkle
import ReactiveSwift
class UpdateManager {
static let useDevChannel: MutableProperty<Bool> = MutableProperty(false)
static func setUp() {
let updater = SUUpdater.shared()!
// force to update since this app is very likely to be buggy.
update... | /content/code_sandbox/SpechtLite/Manager/UpdateManager.swift | swift | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 145 |
```swift
import Foundation
import CocoaLumberjack
import NEKit
class LoggerManager {
static var logger: DDLogger!
static func setUp() {
DDLog.add(DDTTYLogger.sharedInstance, with: .info)
let logger = DDFileLogger()!
logger.rollingFrequency = TimeInterval(60*60*3)
l... | /content/code_sandbox/SpechtLite/Manager/LoggerManager.swift | swift | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 116 |
```swift
import Cocoa
import NEKit
import ReactiveSwift
class ProfileManager {
static let profiles: MutableProperty<[String:String]> = MutableProperty([:])
static let profileNames: Property<[String]> = Property(profiles.map {
return $0.keys.sorted()
})
static let currentProfile: MutableProperty... | /content/code_sandbox/SpechtLite/Manager/ProfileManager.swift | swift | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 907 |
```shell
cd `dirname "${BASH_SOURCE[0]}"`
sudo mkdir -p "/Library/Application Support/SpechtLite/"
sudo cp ProxyConfig "/Library/Application Support/SpechtLite/"
sudo chown root:admin "/Library/Application Support/SpechtLite/ProxyConfig"
sudo chmod +s "/Library/Application Support/SpechtLite/ProxyConfig"
echo done
``... | /content/code_sandbox/SpechtLite/script/install_proxy_helper.sh | shell | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 74 |
```unknown
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
3621B9551DFCDF570003ABB3 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3621B9521DFCDF570003ABB3 /* Result.framework */; };
3621B9561DFCDF570003ABB3 /* Reactive... | /content/code_sandbox/SpechtLite.xcodeproj/project.pbxproj | unknown | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 15,952 |
```swift
import Cocoa
import Sparkle
import ReactiveCocoa
import ReactiveSwift
import enum Result.NoError
import CocoaLumberjackSwift
class MenuBarController: NSObject, NSMenuDelegate {
let barItem: NSStatusItem
let profileAction: CocoaAction<NSMenuItem> = {
let action = Action<String, Void, NoErr... | /content/code_sandbox/SpechtLite/ViewController/MenuBarController.swift | swift | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 2,099 |
```objective-c
#import <Cocoa/Cocoa.h>
@interface AppDelegate : NSObject <NSApplicationDelegate>
@end
``` | /content/code_sandbox/SpechtLiteLaunchHelper/AppDelegate.h | objective-c | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 20 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "path_to_url">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIconFile</key>
<string></string>
<... | /content/code_sandbox/SpechtLiteLaunchHelper/Info.plist | xml | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 319 |
```objective-c
#import "AppDelegate.h"
@interface AppDelegate ()
@end
@implementation AppDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
BOOL alreadyRunning = NO;
NSArray *running = [[NSWorkspace sharedWorkspace] runningApplications];
for (NSRunningApplication *a... | /content/code_sandbox/SpechtLiteLaunchHelper/AppDelegate.m | objective-c | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 195 |
```xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
... | /content/code_sandbox/SpechtLiteLaunchHelper/Base.lproj/MainMenu.xib | xml | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 269 |
```objective-c
#import <Cocoa/Cocoa.h>
int main(int argc, const char * argv[]) {
return NSApplicationMain(argc, argv);
}
``` | /content/code_sandbox/SpechtLiteLaunchHelper/Supporting Files/main.m | objective-c | 2016-08-11T01:34:23 | 2024-08-06T02:48:31 | SpechtLite | zhuhaow/SpechtLite | 2,939 | 30 |
```javascript
var mocha = require('mocha');
var chai = require('chai');
var expect = chai.expect;
var fs = require('fs');
describe('README', function () {
var readme;
var items;
before(function () {
readme = fs.readFileSync('./README.md', 'utf8');
});
it('should be in alphabetical order wi... | /content/code_sandbox/test/readme.js | javascript | 2016-02-18T23:06:44 | 2024-08-14T14:48:27 | awesome-charting | zingchart/awesome-charting | 1,962 | 385 |
```javascript
const ZingTouch = require('./dist/zingtouch.min.js').default;
module.exports = ZingTouch;
``` | /content/code_sandbox/index.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 24 |
```unknown
**/*{.,-}min.js
dist/
``` | /content/code_sandbox/.eslintignore | unknown | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 12 |
```javascript
const webpack = require('webpack');
const minimize = process.argv.indexOf('--minimize') !== -1;
module.exports = (env, argv) => {
argv.mode = argv.mode || 'production';
const plugins = [];
const filename = (argv.mode === 'production') ? 'zingtouch.min.js' : 'zingtouch.js';
const config = {
mo... | /content/code_sandbox/webpack.config.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 240 |
```javascript
module.exports = {
"extends": "google",
"installedESLint": true,
"env": {
"es6": true,
"browser": true
},
"ecmaFeatures": {
"modules": true
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"implicitStrict": false
}
}
};
``... | /content/code_sandbox/.eslintrc.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 97 |
```javascript
let webpackConfig = require('./webpack.config');
process.env.CHROME_BIN = require('puppeteer').executablePath();
module.exports = function(config) {
config.set({
basePath: './',
frameworks: ['mocha', 'chai', 'webpack'],
files: [
'./src/core/main.js',
'./test/**/*.js',
],
... | /content/code_sandbox/karma.conf.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 213 |
```javascript
import ZingTouch from './../src/ZingTouch.js';
/** @test {ZingTouch} */
describe('ZingTouch', function() {
it('should be instantiated', function() {
expect(ZingTouch).to.not.equal(null);
});
it('should have constructors for all of the gestures', function() {
let gestures = [
'Distanc... | /content/code_sandbox/test/ZingTouch.spec.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 130 |
```javascript
'use strict';
/**
* @file Binder.js
* Tests Binder class
*/
import Binder from './../../../src/core/classes/Binder.js';
import State from './../../../src/core/classes/State.js';
/** @test {Binder} */
describe('Binder', function() {
it('should be instantiated', function() {
expect(Binder).to.not... | /content/code_sandbox/test/core/classes/Binder.spec.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 241 |
```javascript
'use strict';
/**
* @file utils.js
* Tests the user-facing API, ensuring the object functions
* while not exposing private members.
*/
import util from './../../src/core/util.js';
/** @test {util} */
describe('util', function() {
it('should be instantiated', function() {
expect(util).to.not.e... | /content/code_sandbox/test/core/util.spec.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 886 |
```javascript
'use strict';
import State from './../../../src/core/classes/State.js';
import Gesture from './../../../src/gestures/Gesture.js';
/** @test {State} */
describe('State', function() {
let state = new State();
it('should be instantiated', function() {
expect(state).to.not.equal(null);
});
it('... | /content/code_sandbox/test/core/classes/state.spec.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 572 |
```javascript
'use strict';
/**
* @file Binding.js
* Tests Binding class
*/
import Input from './../../../src/core/classes/Input.js';
import ZingEvent from './../../../src/core/classes/ZingEvent.js';
/** @test {Input} */
describe('Input', function() {
let event = document.createEvent('Event');
let input = new I... | /content/code_sandbox/test/core/classes/Input.spec.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 616 |
```javascript
'use strict';
/**
* @file Region.spec..js
* Tests Region class
*/
import Region from './../../../src/core/classes/Region.js';
import Binder from './../../../src/core/classes/Binder.js';
/** @test {Region} */
describe('Region', function() {
it('should be instantiated', function() {
expect(Region... | /content/code_sandbox/test/core/classes/Region.spec.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 305 |
```javascript
'use strict';
/**
* @file Binding.js
* Tests Binding class
*/
import Binding from './../../../src/core/classes/Binding.js';
import Gesture from './../../../src/gestures/Gesture.js';
/** @test {Binding} */
describe('Binding', function() {
let gesture = new Gesture();
let element = document.createE... | /content/code_sandbox/test/core/classes/Binding.spec.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 194 |
```javascript
'use strict';
/**
* @file Tap.js
* Tests Tap class
*/
import Swipe from './../../src/gestures/Swipe.js';
/** @test {Swipe} */
describe('Swipe', function() {
it('should be instantiated', function() {
expect(Swipe).to.not.equal(null);
});
it('should return a Tap object.', function() {
le... | /content/code_sandbox/test/gestures/Swipe.spec.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 419 |
```javascript
'use strict';
/**
* @file Gesture.js
* Tests Gesture class
*/
import Gesture from './../../src/gestures/Gesture.js';
/** @test {Gesture} */
describe('Gesture', function() {
it('should be instantiated', function() {
expect(Gesture).to.not.equal(null);
});
});
/** @test {Gesture.getType} */
de... | /content/code_sandbox/test/gestures/Gesture.spec.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 117 |
```javascript
'use strict';
/**
* @file Tap.js
* Tests Tap class
*/
import Distance from './../../src/gestures/Distance.js';
/** @test {Distance} */
describe('Distance', function() {
it('should be instantiated', function() {
expect(Distance).to.not.equal(null);
});
it('should return a Tap object.', func... | /content/code_sandbox/test/gestures/Distance.spec.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 307 |
```javascript
'use strict';
/**
* @file Tap.js
* Tests Tap class
*/
import Rotate from './../../src/gestures/Rotate.js';
/** @test {Rotate} */
describe('Rotate', function() {
it('should be instantiated', function() {
expect(Rotate).to.not.equal(null);
});
it('should return a Tap object.', function() {
... | /content/code_sandbox/test/gestures/Rotate.spec.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 265 |
```javascript
'use strict';
/**
* @file Tap.js
* Tests Tap class
*/
import Pan from './../../src/gestures/Pan.js';
/** @test {Pan} */
describe('Pan', function() {
it('should be instantiated', function() {
expect(Pan).to.not.equal(null);
});
it('should return a Tap object.', function() {
let _pan = n... | /content/code_sandbox/test/gestures/Pan.spec.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 380 |
```javascript
/**
* @file ZingTouch.js
* Main object containing API methods and Gesture constructors
*/
import Region from './core/classes/Region.js';
import Gesture from './gestures/Gesture.js';
import Pan from './gestures/Pan.js';
import Distance from './gestures/Distance.js';
import Rotate from './gestures/Rotat... | /content/code_sandbox/src/ZingTouch.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 227 |
```javascript
'use strict';
/**
* @file Tap.js
* Tests Tap class
*/
import Tap from './../../src/gestures/Tap.js';
/** @test {Tap} */
describe('Tap', function() {
it('should be instantiated', function() {
expect(Tap).to.not.equal(null);
});
it('should return a Tap object.', function() {
let _tap = n... | /content/code_sandbox/test/gestures/Tap.spec.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 290 |
```javascript
/**
* @file interpreter.js
* Contains logic for the interpreter
*/
import util from './util.js';
/**
* Receives an event and an array of Bindings (element -> gesture handler)
* to determine what event will be emitted. Called from the arbiter.
* @param {Array} bindings - An array containing Binding... | /content/code_sandbox/src/core/interpreter.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 240 |
```javascript
/**
* @file main.js
* Main file to setup event listeners on the document,
* and to expose the ZingTouch object
*/
import ZingTouch from './../ZingTouch.js';
if (typeof window !== 'undefined') {
window.ZingTouch = ZingTouch;
}
export default ZingTouch;
``` | /content/code_sandbox/src/core/main.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 67 |
```javascript
/**
* @file arbiter.js
* Contains logic for the dispatcher
*/
import dispatcher from './dispatcher.js';
import interpreter from './interpreter.js';
import util from './util.js';
/**
* Function that handles event flow, negotiating with the interpreter,
* and dispatcher.
* 1. Receiving all touch eve... | /content/code_sandbox/src/core/arbiter.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 664 |
```javascript
/**
* @file dispatcher.js
* Contains logic for the dispatcher
*/
/**
* Emits data at the target element if available, and bubbles up from
* the target to the parent until the document has been reached.
* Called from the arbiter.
* @param {Binding} binding - An object of type Binding
* @param {Obj... | /content/code_sandbox/src/core/dispatcher.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 281 |
```javascript
/**
* @file Input.js
*/
import ZingEvent from './ZingEvent.js';
/**
* Tracks a single input and contains information about the
* current, previous, and initial events.
* Contains the progress of each Input and it's associated gestures.
* @class Input
*/
class Input {
/**
* Constructor funct... | /content/code_sandbox/src/core/classes/Input.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 658 |
```javascript
/**
* @file util.js
* Various accessor and mutator functions to handle state and validation.
*/
/**
* Contains generic helper functions
* @type {Object}
* @namespace util
*/
let util = {
/**
* Normalizes window events to be either of type start, move, or end.
* @param {String} type - The... | /content/code_sandbox/src/core/util.js | javascript | 2016-03-15T20:49:25 | 2024-08-16T15:00:47 | zingtouch | zingchart/zingtouch | 2,112 | 1,543 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.