Skip to content

Instantly share code, notes, and snippets.

View filimo's full-sized avatar

VictorK filimo

View GitHub Profile
@filimo
filimo / flot.js
Last active September 28, 2016 07:05
function main() {
var DevicesConnector = function() {
return new Common.Connector("Handlers/JSonHandler.ashx/Devices/");
}
var params = {
chartType: $(document).getUrlParam("chartType"),
baseCUID: $(document).getUrlParam("CUID"),
CUID: $(document).getUrlParam("CUID"),
hash: document.location.hash.replace("#", ""),
url: $(document).getUrlParam("url"),
function Template(input, tag, options) {
var _options = {
onClone: function(row, data) { },
appendElm: function(elm, val) { elm.text(val); },
replace: false
};
var options = $.extend(_options, options);
var clone = tag;
if (!options.replace) {
//
// ViewController.swift
// UIScrollView
//
// Created by VKushnerov on 1/31/19.
// Copyright © 2019 VKushnerov. All rights reserved.
//
import UIKit
@filimo
filimo / AngularGradientView2.swift
Created August 24, 2019 10:12
Random angular gradient animations in SwiftUI
import SwiftUI
struct AngularGradientView2: View {
var body: some View {
return VStack {
CustomAngularGradientView()
}
.padding([.leading, .trailing], 30)
.animation(Animation.linear(duration: 1).repeatForever(autoreverses: false))
}
@filimo
filimo / 1. UserDefaults+Key.swift
Created September 30, 2019 06:23 — forked from shaps80/1. UserDefaults+Key.swift
Adds a Swift extension to make UserDefaults more consistent to work with.
//
// UserDefaults.swift
//
// Created by Shaps Benkau on 24/05/2018.
// Copyright © 2018 152percent Ltd. All rights reserved.
//
import Foundation
#if os(iOS)

some tools for diagrams in software documentation

Diagrams For Documentation

Obvious Choices

ASCII

@filimo
filimo / duplicate_line_xcode.md
Created December 17, 2019 17:15 — forked from emotality/duplicate_line_xcode.md
Xcode - Duplicate Line key binding

Xcode line duplicate

Bind keys to duplicate lines in Xcode

  1. Open below directory in Finder with Cmnd + Shift + G
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/
@filimo
filimo / MultiStores.swift
Created December 18, 2019 19:57
How to separate Global Store
import SwiftUI
import PlaygroundSupport
class GlobalStore: ObservableObject {
static let shared = GlobalStore()
private init() {}
@Published var api1 = Api1Store()
@Published var api2 = Api1Store()
@filimo
filimo / AdvanceTabView.swift
Created January 17, 2020 21:46
Custom TabView in SwiftUI
class AdvanceTabViewStore: ObservableObject {
private init() {}
static let shared = AdvanceTabViewStore()
@Published var activeTab = 1
}
struct AdvanceTabView: View {
@ObservedObject var store = AdvanceTabViewStore.shared
import SwiftUI
struct ScaleButtonStyle: ButtonStyle {
public func makeBody(configuration: Configuration) -> some View {
print(configuration.isPressed)
return configuration.label
.frame(width: 200, height: 200)
.scaleEffect(configuration.isPressed ? 0.9 : 1)
.animation(.easeInOut)