Skip to content

Instantly share code, notes, and snippets.

View snowden2's full-sized avatar
🏠
Working from home

Sun Yu snowden2

🏠
Working from home
  • Dalian Liaoning, China
View GitHub Profile
//
// RxSample.swift
// Rx Sample
//
// Created by Svetoslav on 2018/12/5.
// Copyright © 2018. All rights reserved.
//
import UIKit
import Model
@snowden2
snowden2 / gist:c04b10f32564afadb4164aa2f3b5f7a5
Created December 9, 2019 04:14
Code which used Ion Range
<ion-content no-padding>
<div id="color-display-container" [ngStyle]="{'background-color': colorCode}"></div>
<ion-item>
<ion-input [(ngModel)]="rgbtxt" placeholder="Enter RGB color(e.g. 25;50;75)"></ion-input>
<ion-button clear item-right (click)="getRGB()">Apply RGB</ion-button>
</ion-item>
<ion-item style="margin-bottom: 5vh;">
<ion-range (ngModelChange)="rChange($event)" [(ngModel)]="R" class="range"
//
// BookingViewController.swift
// Bagation
//
// Created by Bohdan on 09/02/18.
// Copyright © 2018 IOSAppExpertise. All rights reserved.
//
import UIKit
import Stripe
import UserNotifications
import * as React from "react";
import {
Container,
Header,
Title,
Content,
Text,
Button,
Icon,
Left,
import * as React from "react";
import { Container, Header, Title, Content, Text, Button, Icon, Left, Right, Body, View } from "native-base";
import { Alert } from "react-native";
import styles from "./styles";
import { Item } from "../../../store/DomainStore/ReviewsStore";
export interface Props {
navigation: any;
form: any;
onSubmit: Function;
onRemove: Function;
@snowden2
snowden2 / .swift
Created April 17, 2019 20:31
Zendesk Sample By Goeffrey
import ZDCChatAPI
struct ChatControllerDelegate: ChatViewControllerDelegate {
weak var client: APIClient?
func chatController(_ chatController: ChatViewController, sendMessage message: String) {
client?.sendMessage(message)
}
func chatController(_ chatController: ChatViewController, didSelectImage image: UIImage) {
@snowden2
snowden2 / .swift
Created April 17, 2019 20:29
Zendesk Sample By Geoffrey Fahey
import ZDCChatAPI
/**
Converts ZDCChatEvent to ChatItem for use by the UI
*/
extension ZDCChatEvent {
var chatItem: ChatUIEvent {
let date = Date.init(timeIntervalSince1970: self.timestamp.doubleValue / 1000.0)
let url = self.attachment?.url == nil ? nil : URL(string: self.attachment.url)
cmake_minimum_required(VERSION 3.6)
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic" )
#test for ANDROID and look for stuff not relevant to android.
if(NOT ANDROID)
#jni is available by default on android
find_package(JNI REQUIRED)
include_directories(${JNI_INCLUDE_DIRS})
endif()
$base-color: #e5e5e5;
$icon-color: #999;
$text-color: #333;
$highlight-color: #04a4cc;
$notification-color: #d64e07;
$body-background: #f5f5f5;
$menu-highlight-text: #fff;
$menu-highlight-icon: #ccc;