Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ChetanBhasin's full-sized avatar

Chetan Bhasin ChetanBhasin

View GitHub Profile
@ChetanBhasin
ChetanBhasin / Penn Treebank II Tags.md
Last active March 25, 2016 08:02 — forked from nlothian/Penn Treebank II Tags.md
Penn Treebank II Tags
@ChetanBhasin
ChetanBhasin / JSONStringify.swift
Created November 29, 2018 21:26
JSON Stringify in Swift 4
func jsonStringify(value: JSON) -> String {
let returnable = ""
if let data = try? JSONSerialization.data(withJSONObject: value, options: JSONSerialization.WritingOptions.sortedKeys) {
if let string = NSString(data: data, encoding: String.Encoding.utf8.rawValue) {
return string as String
}
}
return returnable

Docker Cheat Sheet

Why Docker

"With Docker, developers can build any app in any language using any toolchain. “Dockerized” apps are completely portable and can run anywhere - colleagues’ OS X and Windows laptops, QA servers running Ubuntu in the cloud, and production data center VMs running Red Hat.

Developers can get going quickly by starting with one of the 13,000+ apps available on Docker Hub. Docker manages and tracks changes and dependencies, making it easier for sysadmins to understand how the apps that developers build work. And with Docker Hub, developers can automate their build pipeline and share artifacts with collaborators through public or private repositories.

Docker helps developers build and ship higher-quality applications, faster." -- What is Docker

@ChetanBhasin
ChetanBhasin / ws_pub_sub.rs
Last active March 20, 2024 22:27
Rust web socket pub-sub example (very minimal)
extern crate websocket;
use std::thread;
use std::sync::Arc;
use std::sync::Mutex;
use std::sync::mpsc::{Sender, Receiver};
use std::sync::mpsc;
use websocket::Message;
use websocket::stream::sync::TcpStream;
use websocket::sync::{Server, Client};