Skip to content

Instantly share code, notes, and snippets.

@Katafalkas
Katafalkas / gist:8336d283a5ccc84a4ec4
Created December 11, 2014 22:15
JSQMessagesViewController for Swift
import UIKit
class MsgVC: JSQMessagesViewController {
var msg:JSQMessage!
var outBubble:JSQMessageBubbleImageDataSource!
override func viewDidLoad() {
initThisView()
@Katafalkas
Katafalkas / gist:eb5e840df1ace981c359
Created December 12, 2014 15:03
Swift UITableViewCell custom subclass simple Chat Bubble
class Cell: UITableViewCell {
override func drawRect(rect: CGRect) {
var bubbleSpace = CGRectMake(20.0, self.bounds.origin.y, self.bounds.width - 20, self.bounds.height)
let bubblePath1 = UIBezierPath(roundedRect: bubbleSpace, byRoundingCorners: .TopLeft | .TopRight | .BottomRight, cornerRadii: CGSize(width: 20.0, height: 20.0))
let bubblePath = UIBezierPath(roundedRect: bubbleSpace, cornerRadius: 20.0)
UIColor.greenColor().setStroke()
UIColor.greenColor().setFill()
@Katafalkas
Katafalkas / gist:366a9f62444e4158c061
Created December 13, 2014 18:48
Swift Drawing Bubble Manually. Dynamiv Bubble View class
import UIKit
class MyView1 : UIView {
override func drawRect(rect: CGRect) {
var bubbleColor = UIColor.whiteColor()
bubbleColor.setStroke()
bubbleColor.setFill()
var bubbleSpace = CGRectMake(16.0, self.bounds.origin.y + 2.0, self.bounds.width - 18.0, self.bounds.height - 4.0)
let bubblePath = UIBezierPath(roundedRect: bubbleSpace, cornerRadius: 16.0)
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
BITHockeyManager.sharedHockeyManager().configureWithIdentifier(kHockeyAppId)
BITHockeyManager.sharedHockeyManager().delegate = self
BITHockeyManager.sharedHockeyManager().authenticator.authenticateInstallation()
BITHockeyManager.sharedHockeyManager().startManager()
<...>
return true
}
import UIKit
import AVFoundation
import GLKit
import OpenGLES
class ViewController: UIViewController, G8TesseractDelegate, AVCaptureVideoDataOutputSampleBufferDelegate {
var tesseract: G8Tesseract!
var label: UILabel!
var imgV: UIImageView!
@Katafalkas
Katafalkas / Implement ZBar in Swift.md
Last active February 2, 2016 19:33
Implementing ZBar Barcode scanner Swift 2.0
*Tunnelblick: OS X 10.12.3; Tunnelblick 3.7.0 (build 4790)
2017-03-28 17:34:07 *Tunnelblick: Attempting connection with foo@bar using shadow copy; Set nameserver = 769; monitoring connection
2017-03-28 17:34:07 *Tunnelblick: openvpnstart start [email protected] 1338 769 0 1 0 1065264 -ptADGNWradsgnw 2.3.14-openssl-1.0.2k
2017-03-28 17:34:07 *Tunnelblick: openvpnstart log:
OpenVPN started successfully. Command used to start OpenVPN (one argument per displayed line):
/Applications/Tunnelblick.app/Contents/Resources/openvpn/openvpn-2.3.14-openssl-1.0.2k/openvpn
--daemon
--log
/Library/Application Support/Tunnelblick/Logs/-SUsers-S123-SLibrary-SApplication Support-STunnelblick-SConfigurations-Sfoo@bar.tblk-SContents-SResources-Sconfig.ovpn.769_0_1_0_1065264.1338.openvpn.log
*Tunnelblick: OS X 10.12.3; Tunnelblick 3.7.0 (build 4790); Admin user
git commit 8c2e63a08fd49c4b4881925fea8282547bf2de25
Configuration foo@foo
"Sanitized" condensed configuration file for /Users/foo/Library/Application Support/Tunnelblick/Configurations/[email protected]:
resolv-retry infinite
ca ca.crt
0x014fC07130aAc3aD4C057183EF39eCB82619c077
@Katafalkas
Katafalkas / gist:1a35957637ca39a953679d2c02c67105
Last active December 10, 2017 13:53
carvertical-bitcointalk.bbcode
[center]
[url=https://www.carvertical.com/][size=30pt][color=#121d36]car[color=#fe832e]|[/color]Vertical[/color][/size]
[size=16pt]www.carvertical.com[/size][/url]
[size=20pt][color=#121d36][b][url=https://www.carvertical.com/carvertical-whitepaper.pdf][color=#121d36]Whitepaper[/color][/url]
[color=#aaa]▬▬▬▬▬[/color]
[url=https://youtu.be/pHZ6w42HjJo][color=#121d36]Explainer Video[/color][/url]
[color=#aaa]▬▬▬▬▬[/color]
[url=https://youtu.be/XtXoAPNsw5Y][color=#121d36]Video FAQ[/color][/url][/b][/color][/size]